Yuo mayby dont understand what i want to say.
I read bit 1 in the pic from lpt , i wait next bit i get him and until 8,
how all bits conect to one byte, example in hex $D5 and store in Eprom. How store in Eprom i now but how with bits? Help
Thanks
maybe i'm dumb to write it but...
1 bit : 1 element
1 BYTE = 8 bits = 8 element
1 WORD = 2 BYTE = 16 Bits = 16 elements.
D5 hexadecimal = 1 byte = 8 bits = 213 in decimal value = 11010101 in Binary value
you're using SPP=Standard Parrallel Port.
so if you send to LPT port D5 = 213 decimal = 11010101 binary you will send the 8 bits, 1 byte , D5 in one task to LPT port.
this is why you must use:
DataFromLPT VAR BYTE ; 8 bits
PICPortPinsToReceiveFromLPT VAR PORTB
start:
DataFromLPT=PICPortPinsToReceiveFromLPT
After receiving D5 from your PC DataFromLPT variable = D5 = 11010101 bin =213 decimal
But maybe you want to receive 8 BYTES and to store them into one variable, in this case you must use ARRAY.
the following will receive 8 BYTES from LPT and store it into My8BYTES array
SleepPin VAR PORTA.0
RParrallel VAR BYTE
My8BYTES VAR BYTE[8]
Loop VAR BYTE
for loop=1 to 8
while SleepPin=High
Wend
RParrallel=PORTB
My8BYTES[loop]=RParrallel
next
Maybe i'm totally out of what you're asking but... TELL ME what i'm missing. i really want to help but sometime i may be wrong in the way i understand your question... maybe caused by my french native language 
Don't be afraid to reply
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks