Attachment 'ej_eeprom.c'
Download 1 #include <pic/p16f877a.h>
2 #define FOSC_HZ 20000000
3 #include <uart.h>
4 #include <delayms.h>
5 #include <inteeprom.h>
6
7 int main (void)
8 {
9 unsigned char tmp,i;
10 delayms(500);
11 uart_open(SET_9600_8N1);
12 uart_putc('\n');
13 uart_puts("Ultimos 4 Datos:");
14 uart_putc(read_int_eeprom(0));
15 uart_putc(read_int_eeprom(1));
16 uart_putc(read_int_eeprom(2));
17 uart_putc(read_int_eeprom(3));
18 uart_putc('\n');
19 i=0;
20 while((i<4)&&(tmp!=13))
21 {
22 uart_putc('>');
23 tmp = uart_getc();
24 uart_putc(tmp);
25 uart_putc('\n');
26 write_int_eeprom(tmp,i);
27 i++;
28 }
29 uart_puts("FIN\n");
30 return 0;
31 }
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.