MDB USART mystery
hello!
i have connected uno r3 circuit desribed in nama mdb 4.2 standard can "talk" vending machine.
i can receive data fine. when try enable transmission
the vending machine goes "out of service" mode. not sending anything. thing i've done enable bit.
is possible arduino transmitting , don't know it? maybe tx set high or something?
should disable tx while don't need it?
will toggling @ run time introduce noise network , screw things up?
thank you.
i have connected uno r3 circuit desribed in nama mdb 4.2 standard can "talk" vending machine.
code: [select]
void init_mdb() {
// set baud rate
ubrr0h = ubrrh_value;
ubrr0l = ubrrl_value;
// disable usart rate doubler (arduino bootloader leaves enabled...)
ucsr0a &= ~(1 << u2x0);
// set asynchronous
ucsr0c = (0<<umsel01)|(0<<umsel00);
// set 1 stop bit
ucsr0c |= (0<<usbs0);
// set no parity
ucsr0c |= (0<<upm01)|(0<<upm00);
// set 9bit
ucsr0c |=(1<<ucsz01)|(1<<ucsz00);
ucsr0b |= (1<<ucsz02);
ucsr0b |= (1<<rxen0); // enable rx
//ucsr0b |= (1<<txen0); // enable tx
}
i can receive data fine. when try enable transmission
code: [select]
ucsr0b |= (1<<txen0); // enable tx
the vending machine goes "out of service" mode. not sending anything. thing i've done enable bit.
is possible arduino transmitting , don't know it? maybe tx set high or something?
should disable tx while don't need it?
will toggling @ run time introduce noise network , screw things up?
thank you.
Arduino Forum > Topics > Device Hacking > MDB USART mystery
arduino
Comments
Post a Comment