View previous topic :: View next topic |
Author |
Message |
samiceng
Joined: 23 Oct 2018 Posts: 5
|
Upgrading from PIC16F91X to PIC16F193X |
Posted: Fri Jul 02, 2021 7:40 am |
|
|
Hi there, I want to upgrade from PIC16F91X to PIC165F193X, So I got PIC16F1934 to play around and see how can I do it. First I know that some peripherals are using different pins than the PIC16F91X, that’s fine since I will also change the PCB also. My problem is:
My application is a 2V with static LCD, as a start I tried to make a simple blinking LED code to see if it will work or not. Now according to the data sheet Page 414, table 30.1, parameter No. “D001”, VDD which is the supply voltage for the PIC16F1934/36/37: it says it should work from 1.8 to 3.6 V if Fosc <= 16MHz. I am working at 4MHz. It didn’t work on both the internal clock or external crystal. It works only at 5V. Here is the code I used for the internal clock. My CCS version is 5.071. Any ideas. Thanks.
Code: |
#include <16F1934.h>
#fuses INTRC_IO,NOVCAP, NOMCLR, NOWDT, PUT, BROWNOUT ,PLL_SW // internal
#use delay(clock=4000000) // 4MHz
void main()
{
while(TRUE)
{
output_toggle (PIN_D1); // Turn on/off LED backlights
delay_ms(500);
}
} |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jul 02, 2021 8:18 am |
|
|
Look at the bottom of your .LST file. Look at the 2nd line for the
configuration fuses. What is the voltage level for the BOR fuse ? |
|
|
samiceng
Joined: 23 Oct 2018 Posts: 5
|
|
Posted: Fri Jul 02, 2021 8:28 am |
|
|
PCM programmer
The BOR level is "BORV19" so it is 1.9V |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Fri Jul 02, 2021 9:38 am |
|
|
No it isn't.....
This is where reading the data sheet is vital.
The '1.9v', is a nominal figure. The actual reset voltage at this setting,
can range from 1.8v to 2.11v. If your chip happens to be one where this
is high, then it is not going to work... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jul 02, 2021 9:38 am |
|
|
As an experiment, try using NOBROWNOUT. |
|
|
samiceng
Joined: 23 Oct 2018 Posts: 5
|
|
Posted: Fri Jul 02, 2021 9:51 am |
|
|
NOBROWNOUT make it works thanks PCM programmer.
Ttelmah: I want to know more about what that reset voltage setting all about, and why the NOBROWNOUT solve my problem. To be honest I don't know that much on the fuses thing. Time to study more.
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Fri Jul 02, 2021 11:13 am |
|
|
The point is that for a significant percentage of chips the 1.9v
brownout setting _will_ reset with a 2v supply....
To be confident that brownout will not reset, requires a voltage above
2.11v. |
|
|
|