News:

Let's find out together what makes a PIC Tick!

Main Menu

Failed at the first hurdle

Started by RGV250, Mar 21, 2021, 01:59 AM

Previous topic - Next topic

RGV250

Hi,
I am trying to convert my FT800 code over to PIC24, on the first compile I find that the 24HJ128GP502 does not have EEPROM.
I googled it and there seems to be limited devices with EEPROM, as most PIC18 have EEPROM's and I recall the geriatric 16F84 had it surely this should have been a minimum for the pretty hopeless designers to include.
Why is it that everytime I see something that is supposed to be a step forward and a great leap forward in technology it always seems to miss out on basic things and is a step backwards.
Is there a way of using the program memory as EEPROM ??

Regards,
Bob

John Drew

Bob, I've had the same frustration. I love using the EEPROM. So easy to use thanks to the compiler.
It is possible to use program memory. The essentials steps seem to be
1) read a block of memory into an array
2) change the byte or bytes you need to in the array.
3) write the block from the altered array.

I think the size of the block depends on the device, not sure about that. It's a pain in the neck compared with using EEPROM and you can't do as many writes.
John

OG


RGV250

#3
Hmm,
Looks like I failed at the second hurdle.
I searched for a 28pin 16bit device with CAN and HEF and there is only one, the dsPIC30F4012 which does not appear to be supported with PDS.

I have to wonder who is in the marketing dept at Microchip, I can imagine the conversations. "Hmm, that seems to be a good thing, take it out and we will sell some crap that is not as good as what it replaces". They will probably get promoted.

Bob

top204

#4
The PIC30F devices are extremely old and are now not supported by Microchip.

They were the very first 16-bit microcontroller released by them about 15 years ago, and are very slow compared to the dsPIC33 types and the PIC24 types, so I did not add them to the compiler beause they operate differently to the newer 16-bit devices. They also had the 4:1 clock ratio for instructions, which made them even more slower.

RGV250

Hi Les,
The problem I have is, I am trying to move forward to 16bits devices but I cannot find a new device that matches up to the old ones.
The 18F2680 is a 28 pin with CAN and EEPROM so has pretty much all I need. When I look for an equivalent in 16bit there does not seem to be anything like it. From the little I know they seem to be promoting HEF as better than EEPROM, what I do not understand is why the new devices do not have similar capabilities to the older devices.

Bob

RayEllam

I would not trust the parametric search on microchip web site. I recently started a project requiring an on board RTCC, the search results suggested a few parts, mainly 24 series. I manually found that most 18f j series have an rtcc, these parts were NOT in the search results.

ken_k

Hi Bob, like you I was disappointed to find no EEPROM and have been fitting 25LC080 family type EEPROMS
the 32k version is about $1.00, the EEPROM's have a data retention of >200 years and their endurance is >1 million cycles, so in some sense it is an upgrade. It all feels like 4 steps forward and 1 step backwards.
https://au.rs-online.com/web/p/eeprom/8246355/
https://docs.rs-online.com/3577/0900766b81345011.pdf



RGV250

Hi Ken,
I do not use EEPROM a lot, I only need 20 bytes and it is the inconvenience of having to modify demo boards for the additional components.

Can you imaging the sales people at FORD, "we are bringing out a new model, it has no hand brake but we can give them a couple of wheel chocks to add on".

Bob

OG

#9
Bob, maybe it will work for you.

DS70191 Flash Programming

also,
like datasheet page 50.