PIC18F26K80 not working in the real world

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

PIC18F26K80 not working in the real world

Postby JLeith » Fri Aug 09, 2019 5:00 pm

I have been Trying and trying to get the PIC18F26K0 to work with NFR905 with LCD
Yes I can program but it will not receive from the Master TX.
I think it is related to the PIC18 overall purpose.
I have included a Pin Allocation design.

The PIC18 loads and I see the 'Main Page" and then the program just sits and looks frozen.
I have old PIC16F1938 modules and when I run the Master the RX modules follow the results.
I have loaded the same Rx module with a few changes to the A4 not on the PIC18F26K80
The PIC 18 won't run the code and follow the Master TX.

On my development I didn't code for the OLED just trying to get the LCD to work in the world of PIC18F26K80

The main reason I went for the PIC16F1938 to the PIC18F26K80 was to get more ram memory. My design was heavy on code and the PIC16 won't handle it.

PIC16F1938 (28-pin, 28KB Flash, 1KB RAM, 256B EEPROM)
PIC18F26K80 (MCU ECAN 64KB Flash 4KB RAM

I was suggested the PIC18F26K80 with twice the ram

Sending to Hex the PIC18 worked as it should, just not able to run in the working world

I think the PIC18F26K0 is a special purpose PIC18 for a unique purposes and not for general LCD and OLED and NFR905 programs.
I can see the LCD displaying the beginning code but it will not display the information coming from the TX module. It works in the PIC16 world if i scale back my flowcode design

I have provided my pin allocations for the PIC18F26K0.

I used the same Flowcode 6 program design from the PIC16F1938 and made 1 change for A4 between PIC16 to Pic18

I special surprise in going to the PIC18 is the world of PicKit3 and MPLAB. I enjoy the speed of the MPLAB loading the PIC18


John
Attachments
PIC18F26K80 Design.jpg
PIC18F26K80 Design.jpg (103.44 KiB) Viewed 543 times
These users thanked the author JLeith for the post:
Benj (Fri Aug 09, 2019 10:57 pm)
Rating: 5.26%
 

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

Re: PIC18F26K80 not working in the real world

Postby Benj » Fri Aug 09, 2019 10:56 pm

Maybe check your configuration settings? Do you have the extended CPU enabled? If so then switch it off. Other settings to disable could include watchdog or LVP.

Without your project or a similar buggy project to look at it's hard to tell what might be at fault.
These users thanked the author Benj for the post:
JLeith (Sat Aug 10, 2019 4:25 am)
Rating: 5.26%
 

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby JLeith » Sat Aug 10, 2019 4:31 am

Thank you Benj

I have attached my Flowcode and I will check out the settings.

Thank you for your time

John
Attachments
OLED LCD Aug 7 Version 2019.fcfx
(159.1 KiB) Downloaded 21 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8377
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby medelec35 » Sat Aug 10, 2019 8:51 am

Hi John,
are you using internal or external osc?
When staring a project the very first thing I always do is a one second flasher
Rather than LED's, I prefer to measure the actual on time of a pulse with an oscilloscope (usually at 10ms).
If not got a scope then LED's at 1 second are good enough.
Have you tired a one second flasher, if so what is the off and off duration times?
These users thanked the author medelec35 for the post:
JLeith (Wed Aug 14, 2019 5:01 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby JLeith » Wed Aug 14, 2019 5:06 pm

Hi Martin
My apologias on not following the 1 sec timer. I had the thought it stayed in the program all the time.

I think I have a glitch in my design. The led is on for 6 seconds.

I have attached my Flowcode. I have the text for the Osccon but it is for the PI16F66K80. Can't find the 26K80.

I use the internal osc.

John
Attachments
OLED LCD Aug 14 timer.fcfx
(160.79 KiB) Downloaded 14 times
6 seconds.png
6 seconds.png (7.63 KiB) Viewed 487 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8377
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby medelec35 » Wed Aug 14, 2019 8:22 pm

Hi John,
Wow six seconds is a huge difference!
Have you tried enabling pllen via osctune register?
Also for 64 MHz , I believe the osccon value has to be 0x70
These users thanked the author medelec35 for the post (total 2):
JLeith (Thu Aug 15, 2019 4:43 pm) • Benj (Mon Sep 23, 2019 10:28 am)
Rating: 10.53%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby JLeith » Thu Aug 15, 2019 5:26 pm

Thank you Martin
I set the values as you indicted and I have 1 second LED pulse

Off to see if my PIC will run my code.

Back soon.

John
Attachments
1sec.png
1sec.png (10.13 KiB) Viewed 468 times
These users thanked the author JLeith for the post:
Benj (Mon Sep 23, 2019 10:28 am)
Rating: 5.26%
 

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby JLeith » Sun Sep 22, 2019 6:23 pm

Thank you all it is now working as you suggested

John
Attachments
Project Completed.jpg
Project Completed.jpg (31.02 KiB) Viewed 240 times
These users thanked the author JLeith for the post:
Benj (Mon Sep 23, 2019 10:28 am)
Rating: 5.26%
 

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8377
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: PIC18F26K80 not working in the real world

Postby medelec35 » Mon Sep 23, 2019 10:58 am

Thats good,
Thank you for keeping us updated.
These users thanked the author medelec35 for the post:
Genilsonsa (Fri Sep 27, 2019 12:25 am)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.