Page 1 of 1

PIC16F1939 Lot of problems

Posted: Sun Mar 18, 2012 8:30 pm
by milea
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

Re: PIC16F1939 Lot of problems

Posted: Mon Mar 19, 2012 12:28 am
by medelec35
Hi milea,
Have you tried file on this post:
http://www.matrixmultimedia.com/mmforum ... 59&#p30659

Don't know If it will help you or not?

Martin

Re: PIC16F1939 Lot of problems

Posted: Mon Mar 19, 2012 8:05 am
by brandonb
i tried to do a acd and lcd on d port with the 1939... the lcd didnt work on d but works great on c port... the adc didnt work correctly on this chip, gave weird results... what i did was used a 18f4685 instead (96kb memory) slightly overkill on programming memory, v4 will crash way before this chip is full :D

Re: PIC16F1939 Lot of problems

Posted: Mon Mar 19, 2012 1:25 pm
by milea
As I said 1. LCD on Port D and 2. Working of ADC and ADC accuracy solved. And both of them it works fine.

I have not resolved only :

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.
Suggestion ??????

Re: PIC16F1939 Lot of problems

Posted: Tue Mar 20, 2012 9:20 pm
by milea
Hi Martin,
Do you have any suggestion or send mi contact for tehnical support, because I' m in a hurry and I have no time left.
Best regards
Mile

Re: PIC16F1939 Lot of problems

Posted: Wed Mar 21, 2012 10:15 am
by Benj
Hello Mile,

Do you have example programs that show the 8K issue and we will have a look into it here.

Re: PIC16F1939 Lot of problems

Posted: Thu Mar 22, 2012 1:04 am
by milea
Hi Ben,
I spent couple of hours to detailed the problem >1fff (indeed it is matrixmultimedia team work) and the results I ' m uploading . I wrote some simple program ~100's displays that changed with taster in two versions less then 1fff and more then 1fff.
At the first I think it's 96 displays and is smaller than 1fff prog. mem. everything is OK and when I put chip PIC16f1939 on my board it works without problem.
At second I think it's 105 displays and the prog. mem. is greather than 1fff and when the programing is done - verifying NOT PASSES!!!. Puting chip on my board - NOT WORKING.
I changed Read4/8 Commands and IncX Command in Chip->Configure->Options but again verifying NOT PASSES!!! - Burning chip not good.
I suspect on PPPv3.exe (ver 3.11.15.30) and it's .cfg files but there I will stop and wait answer from you.
Thanks forward
Mile

Re: PIC16F1939 Lot of problems

Posted: Thu Mar 22, 2012 9:15 am
by Steve
I think you're correct - the PPP programming software seems to fail on 16F chips with memory greater than 0x1FFF. But the HEX file generated by Flowcode seems ok so you if you have access to a PICkit or ICD device you could program the chip.

I will look into the problem with PPP but I cannot promise an immediate fix.

Re: PIC16F1939 Lot of problems

Posted: Thu Mar 22, 2012 8:53 pm
by milea
Hi Steve,
I don't have PICKit and other programer because I have decided to work with MatrixMultimedia Flowcode product (and since now I don't have any problem). I bought Flowc. 3 Bundle after that upgrade Flowcode4 and I 'm planning to upgrade with ver. 5. Before buying the pic16f1939 (more than hundred pcs) I checked the support list were It was.
So my opinion is that if you have trusty customers you must have fast response.
I have bought HP299 FlowKit – but I ‘ ve not installed it yet. Could I program pic16f1939 with it ?
Thanks
Mile

Re: PIC16F1939 Lot of problems

Posted: Thu Mar 22, 2012 9:41 pm
by JohnCrow
Hi Milea
The HP299 is just an in-circuit debugger. It cannot be used to actually program a chip.

Re: PIC16F1939 Lot of problems

Posted: Fri Mar 23, 2012 6:01 pm
by Steve
Hello Mile,

I have sent a new version of PPP to you via PM. Please let me know if it solves your problem.