PIC16F1939 Lot of problems
Posted: Sun Mar 18, 2012 8:30 pm
I have migrated from PIC16f887 (BTW all work fine on it) to PIC16f1939. I want to get more program memory but now I think my choice is bad, mainly because the chip is new and good and stable support for new chips come latter.
1. I have problem to start 2x16 LCD on D port .
The problem I solved to add c-code on begining of the program :
anseld = 0x00;
latd = 0x00;
trisd = 0b00000000;
2. I have problem with Analog chanel of A - Port ( I have used first 4 chanel AN0-AN3), they dont work properly and the macro ReadAsInt give the bad results - very imprecise :
The problem I solved to add c-code on begining of the program :
porta = 0x00;
lata = 0x00;
ansela = 0x0f; // 4 analog
trisa = 0xff; // 8 inputs
and also changed the macro SampleADC() and ReadAsInt() in the C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Components\PIC_ADC_18.c
I upload it but I must mentioned that is it temporary fixes and for other chips that suported PIC_ADC_18.c and other conditions (I use internal clock/Vref+=Vdd/Vref-=Vss) maybe not working, but it is stimulation for MatrixMult team to solve problem completely.
3. I have problem with program more then 8K . They simulated,compiled,linked fine but when I transfered (program and verified OK) the chips not working - completely dead.
Below 0x1fff all works fine. But when I add even 1 byte more chips not working - completely dead.
I use PPPv3.exe ver 3.11.15.30 to transfer the programs.
Also when I choose the PIC16f1939 in chip->configure it show 8k program memory (pic16f1939 have 16k).
I have changed in C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Tools\PPP\ppp_config_data2.cfg:
[PIC16F1939]
pgmmem=0x0
~pgmmem=0x3fff // it was ~pgmmem=0x1fff
cfgmem=0x8007
~cfgmem=0x8008
userid=0x8000
~userid=0x8003
... after that It shows 16384 words (16K) in configurations menu - but chips still not working.
... I also try with -16x compiled with 16x libraries but still not working.
NEED HELP.
Thanks
1. I have problem to start 2x16 LCD on D port .
The problem I solved to add c-code on begining of the program :
anseld = 0x00;
latd = 0x00;
trisd = 0b00000000;
2. I have problem with Analog chanel of A - Port ( I have used first 4 chanel AN0-AN3), they dont work properly and the macro ReadAsInt give the bad results - very imprecise :
The problem I solved to add c-code on begining of the program :
porta = 0x00;
lata = 0x00;
ansela = 0x0f; // 4 analog
trisa = 0xff; // 8 inputs
and also changed the macro SampleADC() and ReadAsInt() in the C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Components\PIC_ADC_18.c
I upload it but I must mentioned that is it temporary fixes and for other chips that suported PIC_ADC_18.c and other conditions (I use internal clock/Vref+=Vdd/Vref-=Vss) maybe not working, but it is stimulation for MatrixMult team to solve problem completely.
3. I have problem with program more then 8K . They simulated,compiled,linked fine but when I transfered (program and verified OK) the chips not working - completely dead.
Below 0x1fff all works fine. But when I add even 1 byte more chips not working - completely dead.
I use PPPv3.exe ver 3.11.15.30 to transfer the programs.
Also when I choose the PIC16f1939 in chip->configure it show 8k program memory (pic16f1939 have 16k).
I have changed in C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Tools\PPP\ppp_config_data2.cfg:
[PIC16F1939]
pgmmem=0x0
~pgmmem=0x3fff // it was ~pgmmem=0x1fff
cfgmem=0x8007
~cfgmem=0x8008
userid=0x8000
~userid=0x8003
... after that It shows 16384 words (16K) in configurations menu - but chips still not working.
... I also try with -16x compiled with 16x libraries but still not working.
NEED HELP.
Thanks