Hi
Flowcode V5.1
Very simple program - if logic 1 seen on PIC16F610 Port C.3 then do something, if logic 0 do something-else.
Simulated - all OK.
Didn't work on the hardware!!
Everything looks fine on an oscilloscope but whatever way I wrote the code in Flowcode the PIC always acted as if it was seeing a logic zero.
Tried input as 'single bit'
Tried input as 'entire port with masking'.
Tried input entire port then did a calulation 'result = result AND 8'.
After many frustrating hours I linked the track to RC.3 (pin 7 on the PIC) to the adjacent pin RC.4.
Changed any reference in code from RC.3 to RC.4 and it works!!
Tried it on 6 different PCBs with consistent results. It is like RC.3 cannot be used as an input?????????
Clive
Strange problem on PIC16F610
Moderator: Benj
Re: Strange problem on PIC16F610
Just tried the original code on a PIC16F616 (same as PIC16F610 but 2K of RAM instead of 1K)
Works fine using RC.3 as an input.
Definitely points to a problem with the Flowcode V5.1 implementation on the PIC16F610. Sorry to be the bearer of bad news!!!
Clive
Works fine using RC.3 as an input.
Definitely points to a problem with the Flowcode V5.1 implementation on the PIC16F610. Sorry to be the bearer of bad news!!!
Clive
- 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: Strange problem on PIC16F610
Hi Clive,
Please can you try adding the following C command into a C icon at the very start of your program and let me know how you get on.
ansel = 0x00;
If this works then I will update the FCD file to replicate the fix here.
Please can you try adding the following C command into a C icon at the very start of your program and let me know how you get on.
ansel = 0x00;
If this works then I will update the FCD file to replicate the fix here.
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
- 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: Strange problem on PIC16F610
Cheers Clive.
I will update the FCD file for v5 and this fix should be included in the next update release.
I will update the FCD file for v5 and this fix should be included in the next update release.
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