pin question
I'm new to the SX and have a quick question...
I need to define a set of 4 rb pins but I only know how to define all 8 as a group and not just the first 4
at the moment my cod looks like this:
'pins
LcdBus VAR RB
Can I define LcdBus as just pins rb.0 to rb.3 ?
thanks for any help,
Owen
I need to define a set of 4 rb pins but I only know how to define all 8 as a group and not just the first 4
at the moment my cod looks like this:
'pins
LcdBus VAR RB
Can I define LcdBus as just pins rb.0 to rb.3 ?
thanks for any help,
Owen
Comments
You will need to declare NewValue as a byte varible or replace it with an existing variable.
I hope this helps.
- Sparks
[noparse][[/noparse]EDIT: I improved the code segment. The previous version would have cleared the high bits of LcdBus.]
Post Edited (Sparks-R-Fun) : 7/5/2007 9:59:00 PM GMT
If you want to use the upper four bits of RB as the LCD buss, you can do it like this:
thank you!
Owen
When you enable the lower 4 pins with this code does this disable the upper 4 pins or can you use the upper 4 pins for something else?
clears the lower bits of RB while preserving the upper bits -- that way they can be used for something else without being bothered by writing to the lower four.