PDA

View Full Version : PC to eeprom w/ bootloader



Johan
- 20th August 2007, 04:35
Is is possible to write directly to EEPROM with a PC ( serial )?

I am thinking something like bootloader routine or ICSP , but instead of downloading program, it just download values to eeprom.


Thanks,

Johan

Raflex
- 20th August 2007, 08:00
Hello, take a look at this link

http://www.pablin.com.ar/electron/circuito/instlab/prg24lc/index.htm

Johan
- 20th August 2007, 08:55
Thanks for the link Raflex, but I want to write to PIC internal eeprom, so the program inside the PIC can access the value and run the program accordingly.

Bruce
- 20th August 2007, 12:26
http://www.microengineeringlabs.com/resources/samples/x1/pbp/progeex.bas

' PicBasic Pro program to receive HEX file from PC and write
' data to I2C memory. Writes data in page mode, 16 bytes at one
' time. Memory device must be addressed with 16 bits and capable
' of receiving 16 bytes at once.

It's not exactly what you're looking for, but it should be easy enough
to modifiy for your application.

Josuetas
- 20th August 2007, 16:41
Hi,

Well what i would do.... i will just opcode hope it helps

1. Use Serial Port Interrupt 'check Instant Interrupts by Darrel Taylor in the forum
2. In interrupt routine something like :


IntHandleRS232:
While (Idontemember)=1 then
COMIN = (Idont remember)
Wend

IF ComIn = 254 then ' 254 is a command that indicates write eeprom of course you decide the number
hserin [BO,B1] ' receive Address B0, anda data B1 to write
WRITE B0, B1 ' you could also control the addr from the pc
ENDIF
@INT_RETURN

3. You would have to make a software (VisualBasic) on your PC that sends info with the format 254(command), addr, data.
4. mmm this its easy but not straightfordward

Well this is the way i have done it, again easy but not simple.

Johan
- 20th August 2007, 18:50
Thanks Bruce & Josuetas,

I think I will try to mix both methods , Instant interrupt is simple to apply, while ME's sample program is complete with checksum

By the way, does PIC16F616 have hardware serial port ( for HSerin command ) ? I never used Hserin/hserout command before, datasheet does not explicitly tell whether it has serial hardware, is it ICSP serial programming pin?

Johan