Fx2lib
0.2
|
#include "fx2types.h"
Go to the source code of this file.
Functions | |
void | sio0_init (DWORD baud_rate) __critical |
void | putchar (char c) |
char | getchar () |
defines functions to print to a serial console with SIO0
Definition in file serial.h.
char getchar | ( | ) |
void putchar | ( | char | c | ) |
putchar('\n') or putchar('\r') both transmit \r\n Just use one or the other. (This makes terminal echo easy)
This function inits sio0 to use T2CON (timer 2) See TRM 14.3.4.1 (Table 14-16) Certain baud rates have too high an error rate to work. All baud rates are .16% except:
12MHZ 24MHZ
Possible Baud rates:
Any of these rates should work except 57600 at 12mhz. -2.34% is pushing most hardware specs for working. All rates at 48mhz work at .16%