Attachment 'ej_uart2.c'
Download 1 #include <pic/p16f877a.h>
2 #define FOSC_HZ 20000000
3 #include <uart.h>
4 #include <uart2.h>
5 int main (void)
6 {
7 char a=0x4a;
8 int x=1030;
9 delayms(100);
10 uart_open(SET_9600_8N1);
11 uart_puts("UART2\n");
12 puthex(uart_putc,a);
13 uart_putc(’\n’);
14 putint(uart_putc,x);
15 uart_putc(’\n’);
16 uart_puts("FIN\n");
17 delayms(100);
18 //laisser un peu de temps pour que le dernier caractère soit envoyé
19 uart_close();
20 return 0;
21 }
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.