TODOPIC

Microcontroladores PIC => Todo en microcontroladores PIC => Mensaje iniciado por: kurdo22 en 29 de Octubre de 2004, 08:01:00

Título: PALABRA CONFIGURACION 18f8720
Publicado por: kurdo22 en 29 de Octubre de 2004, 08:01:00



Muy buenas. Estoy utilizando el 18F8720 y no soy capaz de introducir los bits de configuracion en el programa, es decir, en ensamblador para que los coja el Ic-Prog. Yo lo programo con el Ic-Prog pero los bits de configuracion se los tengo que meter a mano en el Ic-Prog. Lo que querria es que al igual que con otros pic de gama mas baja poder meter en el codigo en ensamblador los bis de configuracion para no tener que meterlos a mano. ¿Algien lo ha conseguido?

   Mirando la data sheet dice que se introducen igual que la escritura en memoria flash, pero esto creo que es lo que hace el propio Ic-Prog. No os habrá surgido esta duda, pero si podeis sugerirme algo os estaria muy agradecido. Un saludo

PD: A continuacion te dejo el cachito de data sheet donde lo he leido.


23.1 Configuration Bits

The configuration bits can be programmed (read as
‘0’), or left unprogrammed (read as ‘1’), to select vari-ous
device configurations. These bits are mapped,
starting at program memory location 300000h.
The user will note that address 300000h is beyond the
user program memory space. In fact, it belongs to the
configuration memory space (300000h through
3FFFFFh), which can only be accessed using table
reads and table writes.
Programming the configuration registers is done in a
manner similar to programming the Flash memory. The
EECON1 register WR bit starts a self-timed write to the
configuration register. In normal operation mode, a
TBLWT instruction with the TBLPTR pointed to the
configuration register sets up the address and the data
for the configuration register write. Setting the WR bit
starts a long write to the configuration register. The
configuration registers are written a byte at a time. To
write or erase a configuration cell, a TBLWT instruction
can write a ‘1’ or a ‘0’ into the cell.