special serial comm!
Cranz
Posts: 9
Hi!
I'm in serious trouble right now!
I try to communicate with a greenhouse computer, but the greenhouse computer communicate this way:
computer to stamp:
The computer generates clock pulses and shifts out the data on the·rising edge of the clock.
stamp to computer.
The computer generates clock pulses and the stamp needs to shift out the data on the rising edge.
I really want to use the shiftin/out command, but it makes one pin input and the other pin clock output. But in my case the greenhouse computer will generate the clock even if I want to receive data.
Can anyone help me write a piece of code to make this work?
Something that will check a pin every time the clock pin goes high. when I want to send there is no problem since shiftout will work just fine. (i think?)
the clock is something between 20 and 30 khz.
8 bit data, 1 parity bit
·
I'm in serious trouble right now!
I try to communicate with a greenhouse computer, but the greenhouse computer communicate this way:
computer to stamp:
The computer generates clock pulses and shifts out the data on the·rising edge of the clock.
stamp to computer.
The computer generates clock pulses and the stamp needs to shift out the data on the rising edge.
I really want to use the shiftin/out command, but it makes one pin input and the other pin clock output. But in my case the greenhouse computer will generate the clock even if I want to receive data.
Can anyone help me write a piece of code to make this work?
Something that will check a pin every time the clock pin goes high. when I want to send there is no problem since shiftout will work just fine. (i think?)
the clock is something between 20 and 30 khz.
8 bit data, 1 parity bit
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax