bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys,
Does anyone know how to transmit this variable ? I can transmit it already, but the character is not as expected...
num2str(ds1307_addr[2]));
I tried to use these functions to transmit :
any ideas ? thank you
Does anyone know how to transmit this variable ? I can transmit it already, but the character is not as expected...
num2str(ds1307_addr[2]));
I tried to use these functions to transmit :
Code:
void usart_transmit( unsigned char data )
{
/* Wait for empty transmit buffer */
while ( !( UCSR0A & (1<<UDRE0)) )
;
/* Put data into buffer, sends the data */
UDR0 = data;
}
void usart_pstr(unsigned char *s) {
// loop through entire string
while (*s) {
usart_transmit(*s);
s++;
}
}
any ideas ? thank you