Im trying to program the SCI tx/rx a pair of HC08's... i think the one that transmits is working find but i cant get the receiver to work... i dunno i feel kind of beyond my skill level. if anyone could look at this code and give me a pointer id appreciate it.
im just gonna post the important stuff, ive already initialized everything and set up baud rates
Master
SCI_write_slave(0); //write a 0 from master to slave
while (PTAD==0x27){
SCI_write_slave(1); //write a 1 from master to slave
}
void SCI_write_slave(char i){
SCIC2 = 0x08; //turn on transmit
SCID=i;
while(!(SCIS1&0x40));
return;
Slave
i=SCIS1
SCIC2=0x04
while(!(SCIS1&0x20));
i=SCID
so im monitoring i and it should hop between 0 and 1 when i push a button, but all it does is give a "trigger a & b" error and resets