hi guys, i was programming a 16f877a to read a pin and output on another pin when it went high. I am trying to modify a pulse width modulation signal. I didnt have internet access there and only just read about the fast io just now.
my question is when i go in tomorrow and set the port for fast io will there be any noticable increase in pin reads or writes?
cant test it till tomorrow, but i gotta know
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
Posted: Sun Feb 22, 2004 12:43 pm
A quick test with the compiler and viewing the LST file:
At the top you see I have #use fast_io(B). Then I set all the bits to output. After that every time I set or clear an individual bit it is one instruction. This would also go for writing all bits in the port with "output_b(bytevalue)".
Then for a test I switch back to #use standard_io(B). Now you see the compiler is inserting a bunch of port direction control instructions. In fact it looks like it is flipping the port back and forth between read and write each time I change the value.
So fast_io means one instruction per port write/read (plus one to configure the port initially) and standard_io is using 4 each time I read/write to the port.
I only tested code generation with one version of the compiler (V3.182) and for one chip (PIC16F88).
If I remember correctly this information is given in the help file but I can't say if it is linked to the #use or the output/input instructions. Sometimes the help file doesn't have everything cross referenced as well as it could. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum