Hello Irmus,
Sorry about misunderstanding you...
Irmus>>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<<
Reading one bit at a time through 1 pin, you use Serin, or Serin2 with the correct baudrate. These commands will automatically read 8 bits for you and put them in hex format.
Reading 8 bits at a time works teh same way...just read the entire port.
Reading 4 bits at once, and combining two 4 bits has been given to you. The only thing I can think of that has not been given to you is a non-compatible serial type of communication. so I am sending you this kind of serial communication.
Ok, I am going to try again... a different way....I am sorry if the code we have given you is not the correct code, or what you are looking for. We are trying our best.
SleepPin VAR PORTA.0
HexVal var byte
counter var byte
Loop:
HexVal=0; 'initialize to zero
for counter=0 to 7
while SleepPin=High
Wend
HexVal=PORTB.1 'or whatever pin you receive data.
HexVal=HexVal<<1
while SleepPin=Low 'allows time to reset sending pin.
Wend
next counter
LCDout HexVal
goto Loop:
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks