Using PIC 16F689

is there any way i can use my Deumilanove to program the PIC 16F689(20-pin interface) or atleast read it's internal contents,
i think using the RX and TX pins , or something similar to this(http://arduino.cc/en/Tutorial/ArduinoToBreadboard) configuration might work?

Any Suggestion's?

Regards,
Nishant Sood

I don't know if you can program PICs with the RX/TX pins, but I'm completely sure you can't read the code loaded on a PIC, no matter that way you use.

Jan

P.S. It can happen what some people here in the Arduino community throw things at you then mentioning PICs :slight_smile:

Let me refer you to the PIC 16F689 datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf

The SPI interface can be used to both read and write program and EEROM memories. Code memory is under flag protection; if this was not set when the PIC was programmed, you can read it like any other memory. It is very handy to read program memory, edit it, and write it back.

Microchip really dropped the ball on microprocessors - they had the field to themselves, but made the cost of entry way to high for individual users. Expensive development systems, expensive compilers, etc. All the things Arduino did right.

Robert

So any specific configuration or circuit i need so as to connect my Deumilanove with the PIC , i want it's content's .
LIKE>> just power both the sides of the PIC and connect the RX and TX pins of the PIC into the RX and TX of Deumilanove?

is it right! can it work same as this >>http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Nishant:
So any specific configuration or circuit i need so as to connect my Deumilanove with the PIC , i want it's content's .
LIKE>> just power both the sides of the PIC and connect the RX and TX pins of the PIC into the RX and TX of Deumilanove?

is it right! can it work same as this >>http://arduino.cc/en/Tutorial/ArduinoToBreadboard

No, it's not right. You need at least to connect the reset pin of the PIC and you need to send some thing specific to the PIC. Because then reseting the Ardunio (i think it's the same with PICs) you have some (milli)seconds to send a specific command to the ATmega(PIC) to write a program/read a program to/from it.

Jan

Let me refer you again to the PIC datasheet.... Rx and Tx are USART pins unrelated to the SPI library provided by Arduino, and I don't think you will get that to work. SPI is designed in the PIC for in-circuit programming; you can have a PIC soldered in a circuit and still read/reprogram it. The Arduino is the Master and the PIC is the Slave. The Arduino SPI library combined with the programming details in the datasheet give you everything you need.

Robert