phoenixy said:
Some more questions,
I'm a little bit confuse about PIC memory. With HC12, I had access to 2K onboard volatile memory, and another 2K non-volatile from an EEPROM extension.
For a start you need to understand a PIC is a totally different type of processor, is uses Harvard architecture, which means program memory and data memory are totally seperate - unlike most other processors.
Typical memory would be 1K or 2K program memory - 14 bit for a midrange PIC, where all instructions (35 of them) are a single word long.
Data memory is usually only 40-50 bytes, known as working registers.
Many PIC's include a small area of non-volatile EEPROM memory as well, usually 64 bytes upwards.
I looked at microchip's website, where memory is divided into three types: flash, opt, rom. I don't quite understand the difference between them. I know that there is an UV-erasable type that takes 20 min to erase. What's the advantage of using this type over regular EEPROM PIC?
FLASH/EEPROM are both easily eraseable, and can be re-programmed in a few seconds. UV-eraseable types, as you say, take a fair while to erase under UV. OTP types are the same as UV-eraseable, but without the window to erase them.
Historically there was only one EEPROM PIC, the 16C84, all others were OTP or UV-eraseable.
There's very little advantage in OTP chips now, the extended range of FLASH and EEPROM based PIC's is really taking over from them - with the current exception of a chip with built-in USB.
Anyways, what I want is a couple PIC with EEPROM (for development and testing), and a load of cheaper PIC with write-once only memory (for finished project)
The FLASH/EEPROM chips aren't much more expensive, you may as well stick to those - I would suggest the 16F628 and 16F876/7 are good choices, have a look at my tutorials for examples.