TUSB3410 i UART

Sep 23, 2003 0 Replies

Witam,



piszê programik na TUSB3410, ktory ma wysylac stringi na UART. Generalnie jesli przed wlaczeniem USB wysylam cos na UART to jest OK, natomiast po wlaczeniu USB ( bUSBCTL |= USBCTL_CONT; ) gdy wysylam stringa pojawia sie na wyjsciu tylko ostatni znak.



Procedura wysylania danych wyglada tak:



VOID rs232PutChar(BYTE bData) { while (bLSR & LSR_TXE == 0); // wait until last byte transfer complete bTDR = bData;



}

void rs232PutString(char *str) { while(*str != '\0') rs232PutChar(*str++); }



czyli po prostu zapisuje poszczegolne znaki do rejestru TDR UART-u.



Czy po zapisaniu znaku trzeba jeszcze cos wywolac, aby go "wypchnac" dalej, czy jest to realizowane automatycznie ?



Pozdr, Karol



Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required