Hi,
I'm playing with a 16F628A to produce a test frequency for some other electronic equipment I'm building.
I needed an 'astable' type operation, so thought I'd try a PIC, (I only need a few Khz so well within its capability)
The first section of code does not work at all ... yet the data sheet indicates that both the MOVF instrunction and the ANDLW instruction conditions the 'Z' flag, what am I missing ?
The second section of code, using a direct bit test works perfectly ....
I just wondered why the first one does'nt work at all.
Test.asm is attached (Just for reference ... not executable)
(Sorry, not discovered how to include formatted code into a post yet ... any help would be appreciated)
Roy
I'm playing with a 16F628A to produce a test frequency for some other electronic equipment I'm building.
I needed an 'astable' type operation, so thought I'd try a PIC, (I only need a few Khz so well within its capability)
The first section of code does not work at all ... yet the data sheet indicates that both the MOVF instrunction and the ANDLW instruction conditions the 'Z' flag, what am I missing ?
The second section of code, using a direct bit test works perfectly ....
I just wondered why the first one does'nt work at all.
Test.asm is attached (Just for reference ... not executable)
(Sorry, not discovered how to include formatted code into a post yet ... any help would be appreciated)
Roy
Attachments
Last edited: