Gast
#50218
Hallo zusammen,
dieses kleine Programm soll a auf die Uart ausgeben..
macht es auch (Initialisierung usw. vorher bereits abgeschlossen
usw..)
Jetzt meine Frage warum muss ich UDR=transmit_byte im unterprogramm
schreiben und nicht UDR=*transmit_byte da transmit_databyte doch eine
Adresse ist und erst mit *transmit_byte den Inhalt bekomme?
Wer kann mir helfen?
MfG
Peter
int main( void )
{
transmit_databyte('a');
}
void transmit_databyte(char *transmit_byte)
{
/*Transmit Databyte*/
for(;;) /*endless loop*/
{
/*loop until Bit UDRE is set in Register UCSRA*/
loop_until_bit_is_set (UCSRA,UDRE);
/*if Bit UDRE is set that means that the transmit/receive register
is empty*/
UDR=transmit_byte; /*If transmitdatabyte is empty send Hex Value*/
}