PIC18F26K80 not working in the real world

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

Moderator: Benj

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

PIC18F26K80 not working in the real world

Post by JLeith »

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.43 KiB) Viewed 8578 times

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: PIC18F26K80 not working in the real world

Post by Benj »

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.

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

Re: PIC18F26K80 not working in the real world

Post by JLeith »

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 249 times

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

Re: PIC18F26K80 not working in the real world

Post by medelec35 »

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

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

Re: PIC18F26K80 not working in the real world

Post by JLeith »

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 258 times
6 seconds.png
(7.63 KiB) Downloaded 2393 times

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

Re: PIC18F26K80 not working in the real world

Post by medelec35 »

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
Martin

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

Re: PIC18F26K80 not working in the real world

Post by JLeith »

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
(10.13 KiB) Downloaded 2374 times

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

Re: PIC18F26K80 not working in the real world

Post by JLeith »

Thank you all it is now working as you suggested

John
Attachments
Project Completed.jpg
Project Completed.jpg (31.02 KiB) Viewed 8275 times

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

Re: PIC18F26K80 not working in the real world

Post by medelec35 »

Thats good,
Thank you for keeping us updated.
Martin

Post Reply