PIC16F1939 Lot of problems

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
milea
Flowcode V4 User
Posts: 16
Joined: Fri Apr 24, 2009 11:56 am

PIC16F1939 Lot of problems

Post 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
Attachments
PIC_ADC_18.c
(8.84 KiB) Downloaded 248 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: PIC16F1939 Lot of problems

Post 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
Martin

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: PIC16F1939 Lot of problems

Post 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

milea
Flowcode V4 User
Posts: 16
Joined: Fri Apr 24, 2009 11:56 am

Re: PIC16F1939 Lot of problems

Post 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 ??????

milea
Flowcode V4 User
Posts: 16
Joined: Fri Apr 24, 2009 11:56 am

Re: PIC16F1939 Lot of problems

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC16F1939 Lot of problems

Post by Benj »

Hello Mile,

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

milea
Flowcode V4 User
Posts: 16
Joined: Fri Apr 24, 2009 11:56 am

Re: PIC16F1939 Lot of problems

Post 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
Attachments
Hallo_morethan_1fff_1939_Internal.zip
(19.39 KiB) Downloaded 235 times
Hallo_lessthan_1fff_1939_Internal.zip
(18.29 KiB) Downloaded 250 times

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: PIC16F1939 Lot of problems

Post 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.

milea
Flowcode V4 User
Posts: 16
Joined: Fri Apr 24, 2009 11:56 am

Re: PIC16F1939 Lot of problems

Post 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

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: PIC16F1939 Lot of problems

Post by JohnCrow »

Hi Milea
The HP299 is just an in-circuit debugger. It cannot be used to actually program a chip.
1 in 10 people understand binary, the other one doesn't !

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: PIC16F1939 Lot of problems

Post 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.

Post Reply