### Welcome to our site!

#### Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Status
Not open for further replies.

#### littletransistor

##### New Member
Hey there,

I'm planning to purchase some 1K EEPROM chips which uses SPI interface, and is it possible to dump the information into the chip using the PICKit 2, and then let the another PIC microcontroller read its contents?

I'm making a toy music box and wanted to preload the ROM with some music first.

#### jimlovell777

##### New Member
Yes and yes. All you would need is a Pickit2 and an SPI routine (or hardware) in your PIC code.

#### littletransistor

##### New Member

I just got these EEPROM chips, and I connected it to the PICKit 2 according to the readme.

However, how am I ever going to dump the contents inside the EEPROM? I tried MPLAB IDE - the Wizard ended up pointing the other compilers for the EEPROM series.

As a test, must I make an ASM, something like

Code:
org 0x00
db .1, .2, .3, .4, .5
end

(these bytes contains arbitary numbers for a test)

#### Pommie

##### Well-Known Member
You need the stand alone PK2 software. You can download it from Microchip.

Mike.

#### birdman0_o

##### Active Member
Hey mike, Pickit didnt seem to have 24LC256 on the list of chips. Isnt this a common EEPROM chip?

#### littletransistor

##### New Member
You need the stand alone PK2 software. You can download it from Microchip.

Mike.

Yes - I have the software, but I'm at a lost here. What should I do next?

I tried making an ASM out of it from the MPLAB IDE, but it refuses to make me a HEX file.

Or should I type the HEX by myself? Is there any proper procedures for that?

Also, the PICKit 2 didn't detect the EEProm - or must I select it manually?

#### Pommie

##### Well-Known Member
In the PK2 software you select device family EEPROM and then the actual device in the drop down box.

As to how you make a hex file, that depends on the data that will go into it. What do you intend putting in the EEPROM?

Mike.

#### littletransistor

##### New Member
In the PK2 software you select device family EEPROM and then the actual device in the drop down box.

As to how you make a hex file, that depends on the data that will go into it. What do you intend putting in the EEPROM?

Mike.

Oh ok got it.

But the hex file - I just have no idea how to make it since I usually make files out of using MPLAB IDE.

Actually I'm intending to put note and frequency data into the EEPROM for my toy music box project. However, I have to get the EEPROM tested and working first by putting arbitary values into the thing.

For example, how am I going to write this in HEX after I wrote:

Define Bytes: 0x1, 0x2, 0x3, and so on

Too bad in MPLAB IDE it wasn't like typing an ASM and then compile it like I used to do in PIC16/18F.

#### Pommie

##### Well-Known Member
Just start a project with an 18 series chip (18F2620) and add an asm file containing,
Code:
	org	0
db	1,2,3,4,5,6
end
And it will make a hex file for you.

Mike.

Last edited:

#### littletransistor

##### New Member
Oh that's good. Is the PIC 18F series chip randomly selected? Or I can simply take a PIC 16F one? If so, I'll try that when I'm back home.

#### Pommie

##### Well-Known Member
You must select a pic18 with at least as much memory as your EEPROM, the 18F4620 has 64k and so will do most EEPROMs. You can't select 16 series as they have 14 bit memory.

Mike.

Last edited:

#### AtomSoft

##### Well-Known Member
This seems very interesting... Care to share more info on actual music box?

#### Pommie

##### Well-Known Member
Hey mike, Pickit didnt seem to have 24LC256 on the list of chips. Isnt this a common EEPROM chip?

It's on my list.

Mike.

#### Attachments

• PK2.png
14.5 KB · Views: 116

#### littletransistor

##### New Member
This seems very interesting... Care to share more info on actual music box?

Oh yeah, will tell you some of the info later. I have to fully make sure it's 100% working first.

Also, could I use C instead of ASM to dump the contents into the ROM? I found it much easier for me to dump an array in C instead of ASM, 'cause in ASM, the "db" and the "dw" can only accept 6 variables in the row.

#### birdman0_o

##### Active Member
Can't you use DT then?

#### birdman0_o

##### Active Member
Not sure, it's what I always used! Never heard of the two you used before this post!

Status
Not open for further replies.

Replies
8
Views
1K
Replies
3
Views
722
Replies
21
Views
23K
Replies
20
Views
2K
Replies
18
Views
4K