hello, there are some questions about pic and picbasic that i is in my mind
im making a project and Im finding it hard to find the answers on my own, so guys I desperately need your help
Im using PIC16F628A
with PICBASICPRO compiler
questions:
1. Is there a default state on the port pins of the pic, like the RBports 2-6 which I think has a default state of LOW, and the RBport 0-3 and 7 which have a default state of high and am i right or should I take a look on my program again
2.how can I extract the the binary bits, let me redefine it by example
I have 4 LEDS which I need to turn 'ON' by a pc's serial port. The combinations of the leds being turned on is dependent on the data that would be send by the serial port of the pc. My idea is since there are 4 leds i figure out maybe i could assign each led on each bit of the last four bit of the data.
for example:
0000/0001
the last 4bit is 0001=> 0 0 0 1
LED1 LED2 LED3 LED4
so instead of the input of too many codes, i figure out setting like that, on that way i could lessen up the code by using loops and arrays
can I extract each bit?
thanks in advance
im making a project and Im finding it hard to find the answers on my own, so guys I desperately need your help
Im using PIC16F628A
with PICBASICPRO compiler
questions:
1. Is there a default state on the port pins of the pic, like the RBports 2-6 which I think has a default state of LOW, and the RBport 0-3 and 7 which have a default state of high and am i right or should I take a look on my program again
2.how can I extract the the binary bits, let me redefine it by example
I have 4 LEDS which I need to turn 'ON' by a pc's serial port. The combinations of the leds being turned on is dependent on the data that would be send by the serial port of the pc. My idea is since there are 4 leds i figure out maybe i could assign each led on each bit of the last four bit of the data.
for example:
0000/0001
the last 4bit is 0001=> 0 0 0 1
LED1 LED2 LED3 LED4
so instead of the input of too many codes, i figure out setting like that, on that way i could lessen up the code by using loops and arrays
can I extract each bit?
thanks in advance