I need an input on PORTB.4. as well as 0-2. Is this feasable or will the that disrupt PORTB.3 in any way and mess up my LCD_Out routine?
First send your schematic... will be more easy to figure what you want to do and how. Maybe you'll need some hardware modification.
How about a CASE 0 ' or %00000000 ? Is that a valid case?
yes
What's the "& %07" after the PORTB for? Setting the Input/ouptuts on PORTB? How can I do this beyond PORTB.3 without upsetting the LCD routine on PORTB.3 (Enable for the LCD?)?
Here's a little basic knowledge tutorial.
& mean a bitwise AND
so the Maskswitch = PORTB & %07 will mean[list]
1. Get the value of the PORTB
2. Take this value, do a bitwise AND with 7 Hexadecimal (or %0000111)
3. place the result in MaskSwitch variable[list]
for a example, if portb = %1111101, value of MaskSwitch will be %00000101. As you see, it return only the first three bits of PORTB
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks