/* Demonstrate serial RS-232 communication via the USART8251 */ // A simple demonstration of the USART 8251 connected to the MIPS // system bus. This program just transmits a welcome message, and // then starts to send out a counter value... // TinyMips doesn't support interrupts (yet), so polling is used. // Remember that nCTS must be kept low to enable the transmitter // of the USART 8251. int main( int argc, char** argv ) { int count; int* global; global = (int*) 0x00000400; *global = 0xcafebabe; for( count=0; ; count++ ) { *(global+1) = count; *(global+2) = ~count; *(global+3) = 0xabba0000 + count; } }