Flowcode and MPLAB IDE

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
FCCHow
Posts: 27
Joined: Fri Jul 28, 2006 10:40 am
Contact:

Flowcode and MPLAB IDE

Post by FCCHow »

I have just bought the Flowcode v2.0 and also finally got to upgrade my 1996 PicStart Plus too. After poking about in the tutorials, I have charted my first program for the PIC16F628A. I saved it, and used MPLAB to assemble it and then programmed it to the PIC.

And nothing happens.

Although the Flowcode simulation is perfect, when I compiled it under MPLAB, it said "Build suceeded" but there were a lot of other statements like:

Message[302] C:\FLOWCODE FILES\PHASER~1.ASM 944 : Register in operand not in bank 0. Ensure that bank bits are correct.

BTW, the MPLAB is at version 7.41. I am not sure who to turn to since I am quite new to this PIC stuff. Can you help me on this?

Thanks

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

Firstly check the settings to ensure that you aheve right target PIC selected, and are configured correctly.

Do the tutorial files assemble and run ok?

Have you tried a very simple LED on test program to see if that works?

Are you using any C or ASM code in your program?

If you are still having problems email me at support@matrixmultimedia.co.uk

User avatar
FCCHow
Posts: 27
Joined: Fri Jul 28, 2006 10:40 am
Contact:

Post by FCCHow »

Dear Ian,

I have targeted the PIC in both Flowcode and PICstart Plus as PIC16F628A, disabled the Watchdog timer and also, use XT as oscillator. As you have suggested, I created a simple LED flashing program and tried to compile it. Nothing works until I noticed the DOS window when I was compiling to ASM.

The error message was:
Built-in variables are obsolete. Use variables defined inside the system header file.

And if I tried to compile my original program, there were extra errors including the above:
C:\FLOWCO~1\PHASER~1.C(131): Warning:Possible truncation to 8-bit
C:\FLOWCO~1\PHASER~1.C(284): Warning:Possible truncation to 8-bit

Thinking it were lines to the program, I went for the .lst file and looked up these lines in Hex which were 83 and 11C respectively where there were no errors except for the usual:

Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.


So, I am not sure about all these as I am not very good at programming in any languages whatsoever and I am new to all this. I only know Electronics.

I can send you the .fcf file if you need to have a laugh at it, though


Thanks

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

Doh!
Should haveread the initial post more carefully.

With PPP the config word is set in PPP and gets sent as part of the process.
The config word is not embedded into the program by default.
You may need to set up PICSTART to configure the PIC, or to embed config words into your program using a C Code icon. (Use PPP config screen to work out the config values).

Regarding the error messages:

Built in variables are obsolete... and the truncation warnings can be safely ignored.
This is just the compiler either complaining that Flowcode does not create C Code in the latest fashion (due to older components not having been built that way), or stating the obvious in that arithmetic on an 8 bit PIC may end up with an 8 bit result (the compiler can handle 16 bits and seems to get upset when the PIC can't).

User avatar
FCCHow
Posts: 27
Joined: Fri Jul 28, 2006 10:40 am
Contact:

Post by FCCHow »

Dear Ian,

So, this means my untinstalling and reinstalling the Flowcode was not a good idea. Is there any other way to explain how to do this step by step as it all seemed very Greek to me.

Thanks in advance.

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

What you need to do is get the Config words into your program.
With PPP you set up the Config in PPP and it gets sent along with the program.

With PICstart plus you may need to add t oyour program. You can use the Add Defines component, or a C Code icon at the start of your program with the config words in them.
e.g.

asm {
__config 0x3FFF
}


You can use PPP to get the config word values. They are listed towards the bottom right hand side of the Expert Config screen.

Post Reply