Might be a common question.
What would be a suitable replacement for a pic16f628, its been out a while now and I spose microchip will be saying if not allready that the device is obsolete.
I use timer 0, 1 and 2, the pwm module, the uart and external clock for tmr1.
I like the 16F1827. There is some sample code here: https://www.electro-tech-online.com/threads/16f1827-code-in-asm-hi-tech-c.136326/
There are a few differences. 2 config lines, ; bsf STATUS, RP0 ;This doesn't work on 16F1827 use BANKSEL instead
BANKSEL TRISB
You have to set ANSELA and ANSELB
There are a few more differences. I haven't encountered all of them yet.
Your not doing anything there to setup the chip other than the io direction, microchip finally fixed their sillyness then.
You have to clear ansel on the pic16f88 if your not using atod.
I see the chip runs at 32mc, is that directly or does the device have a pll inboard?
I've been through the oscillator monitor and the auto switch over business with the '88, but theres some other config bit stuff there I havent seen before.
I'm gonna pick some up and have a play.
I bought a PK3 in order to be able to use the 1827 - but a few months afterwards it was added to the PK2, but NOT from within MPLAB (although it could be by now?).
Yes I'm using Pk2 V2.61 with the latest device file 1-62-14 containing the 1826/7, but was wanting to know if /how the Pk2 handles the 9v Vpp the 1827 needs or must some additional circuity be added to reduce the normal 12v Vpp.
Yes I'm using Pk2 V2.61 with the latest device file 1-62-14 containing the 1826/7, but was wanting to know if /how the Pk2 handles the 9v Vpp the 1827 needs or must some additional circuity be added to reduce the normal 12v Vpp.
The PK2 has variable Vpp voltage, generated by a switch-mode software driven system, monitored by the ADC in the PK2 processor.
Assuming of course that the 1827 isn't perfectly fine with 12V?, I've never read the datasheet to find out - but in the older devices it was more a minimum voltage to make it switch to programming mode, and it was good practice to aim a little higher than the minimum.
Set the clock to 8Mhz and enable the 4xPLL
After a reset the internal oscillator runs at 500Khz not 4Mhz like the 16F628
Yes I'm using Pk2 V2.61 with the latest device file 1-62-14 containing the 1826/7, but was wanting to know if /how the Pk2 handles the 9v Vpp the 1827 needs or must some additional circuity be added to reduce the normal 12v Vpp.
The PK2 does set Vpp to 9 volts without any additional circuitry when programming the enhanced devices.
With the PK2 standalone application I have to go to the 'Device Family' drop down - select Midrange - 1.8V Min option for it to detect the enhanced midrange parts