You understand that you can not use the Arduino IDE to program the PIC? You need a different development environment for the PIC.
2)
Is the CAN part relevant? Do you want to communicate using the CAN bus?
3)
What do you mean by write/extract eeprom? The eeprom that stores some data (just like the most Arduinos have some eeprom memory) or the program memory?
4)
If (3) is indeed eeprom: I don't have experience with CAN. But you can connect the PIC uart pins to the Arduino uart pins or us SPI interface and achieve what you want to achieve.
I ultimately want to make a CAN shield that I can use to interface with a vehicle network. I called this a learning circuit because I am hoping to learn from this.
The PIC has some eeprom, I would like to read/write from it. Similar to the memory Arduino has.
If (3) is indeed eeprom: I don't have experience with CAN. But you can connect the PIC uart pins to the Arduino uart pins or us SPI interface and achieve what you want to achieve.
I think this is what I am leaning towards, using the serial I/O. Do I just put a wire connecting the TX/RX lines with a 1k resister on each line like Ricky101 said in the first post?
I am not dealing with CAN at the moment, just getting acclimated to using another MCU. I am focusing on just reading/writing to and from the arduino to the PICs EEPROM. Can you lay out the steps I need to accomplish this task?
I found this in the PIC programming manual.
4-Bit
Command
Data Payload Core Instruction
Step 1: Direct access to data EEPROM.
0000
0000
9E A6
9C A6
BCF EECON1, EEPGD
BCF EECON1, CFGS
Georgeduino:
I am not dealing with CAN at the moment, just getting acclimated to using another MCU. I am focusing on just reading/writing to and from the arduino to the PICs EEPROM. Can you lay out the steps I need to accomplish this task?
I found this in the PIC programming manual.
4-Bit
Command
Data Payload Core Instruction
Step 1: Direct access to data EEPROM.
0000
0000
9E A6
9C A6
BCF EECON1, EEPGD
BCF EECON1, CFGS
Can you provide a link to that programming manual? And preferably the chapter / page in there where you got the above data from?
I can see two possibly ways to access the eeprom of the PIC. The first one is to write a program for the PIC that communicates with the Arduino; Arduino sends command, PIC interpretes and gives some data back. The second way might be to directly access it using some kind of programmer and the Arduino will be your programmer in that case.
Sterretje, I am trying to do the latter with Arduino as the programmer.
To give you a better background why I am doing this.
This is for a digital forensics class I am working on a project to extract memory from a device.
The PIC (44pin TQFP) had some data stored on EEPROM and I am trying to get it out. Therefore I am not trying to program, just access the EEPROM function.
Based on the programming documentation I have, The pin for the PIC are:
MCLR/VPP VPP P Programming Enable (pin 18)
VDD VDD P Power Supply (pin 7,28)
Vss VSS P Ground (pin 6,29)
RB6 SCLK I Serial Clock (pin 39)
RB7 SDATA I/O Serial Data (pin 40)
How I think I understand it is....
I must enter program mode, then send a series of 20 bit messages to the PIC's SDATA line to access the EEPROM (20 bit to access the EEPROM, 20 bit message to set the address, third 20 bit message to initiate a memory read, and finally to read it.
How exactly do I connect the arduino in all of this?
The PIC Serial line (pin 40) is I/O while the arduino Serial is one for TX and one for RX (pin 0,1)..
You can connect an Arduino to a Pic and read out the Pics eeprom content, but not without the Pic having a suitable program to allow it to communicate with the Arduino, so you have to use a Pic programmer to make that happen.
If you have a Pic programmer , then there is no need to use the Arduino as Pic programmers have the ability to read out and display EErpom - see picture.
You can buy a ready made Pickit programmer quiet cheaply or build a very basic diy one for about £12 / $16
You need two lines for the data. It uses synchronous serial communication (by the looks of it) where the SCLK is used to clock data into the PIC or out of the PIC. You nerd to consult the datasheet of the micro on the Arduino (Atmel 328 for an Uno) to see if it supports it; I'm not sure.
You probably have to get the PIC in programming mode by applying a higher than usual voltage to the Vpp pin; my knowledge however is a very rusty in this area.
Can you provide a link to the programming manual so I can have a look.
Georgeduino:
The PIC (44pin TQFP) had some data stored on EEPROM and I am trying to get it out. Therefore I am not trying to program, just access the EEPROM function.
What has this got to do with CAN - which was in the first line of your Original Post?
What does the PIC datasheet say about accessing the PIC EEPROM?