Hi,i have 2 questions :
1. i am using flowcode ver 2 .There is one block write C. code. how to insert the c language progrm into this block. what type of c compiler the program use. is it c2c ?
2. how to use rs232 block because i try to write a character inside the block but notting happens. any example
insert c language to flow code
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
You can use the 'C' icon to insert sections of C code into your program. If you want to put more code in, then use the "Add Defines" component. And yes, for v2 of Flowcode use C2C.
In v3 of FLowcode, the compiler is BoostC. Also, the "Add Defines" component has been superceded with the "Supplementary Code" feature.
For the RS232 block, the one with v2 of Flowcode is quite limited - you need to be running the PICmicro with a 19.6608MHz crystal. If it's still not working, make sure the settings are the same on both sides of the RS232 cable - ie, same baud rate, same flow control (hardware or none). Also, if you are using a PC use the following settings:
* 8 data bits
* no parity
* 1 stop bit
In v3 of FLowcode, the compiler is BoostC. Also, the "Add Defines" component has been superceded with the "Supplementary Code" feature.
For the RS232 block, the one with v2 of Flowcode is quite limited - you need to be running the PICmicro with a 19.6608MHz crystal. If it's still not working, make sure the settings are the same on both sides of the RS232 cable - ie, same baud rate, same flow control (hardware or none). Also, if you are using a PC use the following settings:
* 8 data bits
* no parity
* 1 stop bit
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
I have been having problems with the add defines component in v2 (i.e. C2C), if I create a table in a C block and make sure it is at the beginning of the code (so no macros used) the the following works fine :
const char table[] = {1,2,3,4};
and I can retrieve the table values in a further C block.
FCV_DATA = table[FCV_INDEX]
However, when that same table definition code is placed in an Add Defines component the compilation reports an error.
Any ideas what I am doing wrong?
Should I wipe the "//Ad defines component code." header that is in the add defines box (I have tried with and without.) and why does that text not end with a ; character as seems the norm in C2C.
Thanks
const char table[] = {1,2,3,4};
and I can retrieve the table values in a further C block.
FCV_DATA = table[FCV_INDEX]
However, when that same table definition code is placed in an Add Defines component the compilation reports an error.
Any ideas what I am doing wrong?
Should I wipe the "//Ad defines component code." header that is in the add defines box (I have tried with and without.) and why does that text not end with a ; character as seems the norm in C2C.
Thanks
Go with the Flow.