Electronics Computer Programming Q&A
6 posts • Page 1 of 1
I have been building some circuits using PIC16f84 ICs. Once I put these together they stay together but I have been using the reprogramable PIC16F84 (4Mhz) IC. <p>Is there a direct OTP relacement for this chip? I'm just trying to reduce my hobby expenses a little bit.
Only a part helpful answer - look at any of the 16Cxx series apart from the 16C84 which is confusingly a flash part, thougg defunct for ages now.<p>Colin
On a clear disk you can seek forever.
If you can modify the code slightly then consider porting to a PIC 16F627A or 16F819. For the most part you need only add a few instructions to set the comparators and A/D off. These chips are about 1/3 the cost of the 16F84 (why? I have no idea) and have more features. You can even utilize their internal 4MHz oscillators and save even more money.
>>consider porting to a PIC 16F627A or 16F819<p>Are they flash as well? Does Picbasic work with them as easily as the 16f84? Can I access there A/D with Picbasic standard or must I have pro?<p>Matthew<p>[ February 09, 2005: Message edited by: matthewh ]</p>
Within the 16x family (except he 16x5xx) the code is the soem and the SFRs are in the same place. When porting code to a different PIC in the same family, different peripherals may have to be initialized at the beginning of the program (like turning off the ADC to free up PORTA). Also, many of them have active SFRs up to 0x1F so you'll have to redefine your use of GPRs.
> Are they flash as well? Does Picbasic work with them as easily as the 16f84? Can I access there A/D with Picbasic standard or must I have pro?<p>Yes, They are flash based so they can be reprogrammed numerous times. The memory layouts and ports are very similar so most code should work no problem. I don't have much experience with PBasic but melabs claims the chips are supported. You will likely need to include the appropriate header/include file to tell the compiler what the chip looks like internally but the compiler should shield you from most of the differences. As noted by Mr. Rosa when programming in assembler one must switch off peripherals (that weren't present in the 16F84) like the A/D and comparators to free up PORTA. It's possible the compiler will do this for you if fed code that includes the correct header file but I'm not sure offhand. Access to these peripherals in the non-pro compiler seems to be through a mixture of peeks/pokes and inline assembler.<p>Either way, I would recommend getting a couple 16F819s to play with and try to port your code. They are much more capable chips (More program memory, SRAM amd EEPROM, A/D, Comparators, the chip can even write its own program memory) than the old 16F84s and are much cheaper. You won't be giving up anything by using them once you get your code ported. I have completely stopped using 16F84s going forward.<p>One note on programming the chips; the newer chips use a different algorithm to flash the firmware. You will need to get an upgrade to your programmer software to be able to flash 16F819s (if you haven't already). Of the various programmers I use (Warp-13, Olimex) all have this software available.
Users browsing this forum: No registered users and 3 guests