Having trouble with print string on displays

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

Moderator: Benj

Post Reply
JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

Having trouble with print string on displays

Post by JFinlayson »

Hi having trouble with displays
I was trying to use LCD but it kept having some problems so ordered new programmer and LCD board from Matrix.
Then went on to try things with the GLCD board EB043. Graphics and print number OK but unable to print strings using print command either does not print at all or prints corrupted characters.
Then went back to LCD board.
After much playing around and checking things like Low voltage programming disabled and dedicated ICD disabled I find that the culprit was extended CPU enabled. disabling this got everything working again.
Question why is enabling extended CPU affecting the print string function for displays?
:?
The older the boy the bigger the toy

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: Having trouble with print string on displays

Post by Benj »

Hello,

The extended CPU functionality seems to corrupt array data which includes the Flowcode string variables, it looks like the extended CPU functionality maybe needs some kind of specific setup or command to allow data arrays to work correctly.

Must admit it's something I've never really looked into so if anyone has any further information on this and what it can do for you then I would be interested.

Datasheet states this:
XINST: Extended Instruction Set Enable bit
1 = Instruction set extension and Indexed Addressing mode enabled
0 = Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
And
Extended Instruction Set: The PIC18F2455/2550/4455/4550 family introduces an optional extension to the PIC18 instruction set, which adds 8 new instructions and an Indexed Literal Offset Addressing mode. This extension, enabled as a device configuration option, has been specifically designed to optimize re-entrant application code originally developed in high-level languages such as C.

JFinlayson
Posts: 93
Joined: Mon Sep 23, 2013 4:33 pm
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: Having trouble with print string on displays

Post by JFinlayson »

Just checked the datasheet and Microchip also says:
In addition to eight new commands enabling the extended instruction set has a significant impact on the way that many commands of the standard PIC 18 instruction set are implemented. That is, all byte orientated and bit orientated instructions, or almost half of the core PIC18 instructions, may behave differently.
With this in mind shouldn't Flowcode disable this function as a matter of coarse?

:)
The older the boy the bigger the toy

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: Having trouble with print string on displays

Post by Benj »

Hello,
With this in mind shouldn't Flowcode disable this function as a matter of coarse?
Yes this would be ideal, however unless we specifically add a hard coded value to each of the definition files Flowcode will revert to the defaults which is usually "Extended CPU Enabled", "Watchdog enabled" and "Low Voltage Programming Enabled" i.e. all the complicated show stoppers are enabled out the box!

Guessing at these default config values for everyone using Flowcode is a near impossible task but I have done this already for some of the more popular devices.

User avatar
AbhijitR
Posts: 299
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 280 times
Been thanked: 79 times
Contact:

Re: Having trouble with print string on displays

Post by AbhijitR »

Hello BEN and JFinlayson

Many thanks for this important NOTE regarding the STRING DISPLAY, it really helped me.

Regards

Post Reply