Variable Bit Error
Moderator: Benj
Variable Bit Error
Bit variable behaves as a byte....
- Attachments
-
- I declare a variable of 1 bit
- 0 Перем.jpg (100.88 KiB) Viewed 11349 times
-
- 1 Сим Флов.jpg
- Flowcode showed a 1 bit
- (173.27 KiB) Downloaded 815 times
-
- 2 Сим Прот.jpg
- Proteus showed a byte
- (221.66 KiB) Downloaded 815 times
Re: Variable Bit Error
I did this device.
The real variable - BYTE !!!
The real variable - BYTE !!!
- Attachments
-
- BUG.fcfx
- Program
- (6.38 KiB) Downloaded 338 times
-
- The device itself
- 3 Плата.jpg (160.23 KiB) Viewed 11349 times
-
- Oscilloscope
- 4 Осцил.jpg (181.84 KiB) Viewed 11349 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Variable Bit Error
Hi Osta,
BoostC did not support bit variables so we simply made a bool equal to a byte.
XC8 does support bit variables so the attached code should solve the problem your having.
The file lives in the "Flowcode 7/CAL/PIC" directory.
BoostC did not support bit variables so we simply made a bool equal to a byte.
XC8 does support bit variables so the attached code should solve the problem your having.
The file lives in the "Flowcode 7/CAL/PIC" directory.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Variable Bit Error
Hi Benj!
Yes! Now it works.
Now it is necessary to add the COF file ..
Regards Slava.
Yes! Now it works.
Now it is necessary to add the COF file ..
Regards Slava.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Variable Bit Error
Hi Slava,
The PIC XC8 compiler should automatically create the .cof files as part of the compile process.
I've found a bit of a bug concerning the last update and may explain things. Anyway it seems to have broken other parts of the code so I am investigating this now.
Here's the original file if you need to go back.
The PIC XC8 compiler should automatically create the .cof files as part of the compile process.
I've found a bit of a bug concerning the last update and may explain things. Anyway it seems to have broken other parts of the code so I am investigating this now.
Looks like to use the bool type as a macro parameter it cannot be a bit in the C code for 8-bit PIC. The compiler will likely use a full byte memory location for each bit variable anyway (unless combined into a struct) so even if we are using byte in the C code it should not have any impact on code efficiency.(698) bit variables must be global or static
Here's the original file if you need to go back.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Variable Bit Error
Thanks Benj!
I will leave as is, since other functions are working properly.
For example, select the team (if) does not always work correctly.
Regards Slava.
I will leave as is, since other functions are working properly.
For example, select the team (if) does not always work correctly.
Regards Slava.