For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.
Could this be a compiler error?
When I compile my rtcc test program to a pic18f25j50 the usb to serial sends the data to my pc as expected but when I compile to pic18f46j50 the data send to my pc is different and mixed around.
Try loading the 18F46j50 with the hex file generated from your 18F25j50 project (since that one works) and see if it now works correctly. If it does work, then take a close look at the changes you made in your 18F46j50 project versus the 18F25j50 project.
Thanks for the reply.
I found that there is a clock speed difference even though both pics are using the same 8Mhz crystal & same rtcc crystal.
I also found that for some reason even when I remove the 8Mhz crystal the program keeps on running like nothing has changed.
Please have a look at the way I setup my config and rtcc timer to make sure there are no conflict.
Thanks for posting your discovery Desdewit. It turns out that the configuration address in the .fcd files for this entire family needs to be edited. The configuration addresses can be found in table 6.1 in the device data sheet. Please find the line containing "ConfigAddress=" in the .fcd file for these chips and change the value according to the data sheet table. For example, in the PIC18F46j50 .fcd file the line should read ConfigAddress=0xFFF8 (save the change and restart Flowcode).
As for checking your rtcc timer, I have never worked with the rtcc and I also don't use 18F devices so I can't help with that.
After changing the ConfigAddress I’ve noticed some other problems.
When my board is powered by usb only the first ASCII string send to LCD “Starting” display correct but the second ASCII string display as “PULLILE” instead of “running”
When powered from normal 12V power supply the program does not even start-up.
If you disable the assembler code you have to setup the RTCC then does the "Running" string appear correctly? Could be something to do with the RTCC code or the interrupts. String corruption on an 18F is normally associated with extended CPU config setting but your config has this setting disabled already.
I found that when I disable the RTCC Output Enable bit "bsf_rtccfg, RTCOE" the display is Ok.
The only other problem I found is that the program run +/- 200ms slower according to my test led on port D5 when I unplug the usb to serial cable.
Does not matter what Mhz crystal I put in the led speed stays the same.