At the moment I am having to set all eight outputs individually,
is there a way to output a byte variable to a port rather than setting
each output. It basically a serial to parallel converter with a little bit
of processing, but i need to avoid IO jitter.
Define DS1 portb
Do' inputing serial dataSetWith(DS1,abytevariable)LoopEND
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To avoid IO jitter I program the whole port directly.
I set the affected bits to their value in a variable, mask them with the bits that are not to be programmed, and then directly program the TRIS register with the value of the variable.
(Example: TRISB = MyVar).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At the moment I am having to set all eight outputs individually,
is there a way to output a byte variable to a port rather than setting
each output. It basically a serial to parallel converter with a little bit
of processing, but i need to avoid IO jitter.
Define DS1 portb
To avoid IO jitter I program the whole port directly.
I set the affected bits to their value in a variable, mask them with the bits that are not to be programmed, and then directly program the TRIS register with the value of the variable.
(Example: TRISB = MyVar).
TRISB is chip specific - I recommend using portable port addresses like PORTB.
Certain. It was an example.
DS=255
This will set all bits.
Also, see #Option for jitter free option when setting bits.
Also, setting PORT.bit = 1 or 0 is faster. Where bit is a valid bit number.
Then, see #option volatile