Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Output glitch when using a bootloader.

(you are viewing a thread; or go back to list of threads)

Output glitch when using a bootloader. (by Henrik Olsson)
Hi,
First let me thank you for this very cool tool!
I'm using a 16F88 running on the internal oscillator at 4Mhz. Using LDMicro I compile this simple program:

|| ||
|| TPriSoftStart YPriSoftStart ||
1 ||--[TON 2.000 s]----------------( )-------||
|| ||
|| ||
|| ||
||------[END]------------------------------||
|| ||
|| ||


I/O ASSIGNMENT:

Name | Type | Pin
---------------------+------------------+------
YPriSoftStart | digital out | 18
TPriSoftStart | turn-on delay |


Using my PICStart+ device programmer to flash the PIC it seems to work as it should.

However, when using my bootloader (MCLoader from www.mecanique.co.uk) the output turns on for exacly one cycle time when powering up or resetting the chip. Then the delay kicks in and after 2000mS (or perhaps it is 2000 - 1 cycletime) the output turns on, as it should.

I've verified this with a scope and setting the cycle time in LDMicro to 10mS and 100mS and the output "glitch" is exacly one cycle time in both cases.

The information about the bootloader says that the first four bytes of program memory needs to be "left alone" by whatever program is being downloaded thru the bootloader. If I've understood your previous messages about the TinyBootloader that IS exactly what LDMicro does when it compiles the code, or is this not the case?

Just in case, I tried the version you uploaded in the thread about TinyBootLoader but it didn't make any difference.

Do you have any ideas why this is happening?

Thanks again for making this available to the public!

/Henrik.
Sat Aug 1 2009, 11:53:16
(no subject) (by Jonathan Westhues)
I would guess that it's happy with the first four instructions of program memory, since it does seem like your program is getting a chance to run eventually.

So the only thing that I can think of is that there's a problem relating to the state in which the bootloader leaves the registers. So I've modified the pic16 target to initialize a few more things at startup.

Let me know if this build works for you; please test with both the bootloader and the PICStart+.
Sat Aug 1 2009, 18:26:46, download attachment ldmicro.zip
(no subject) (by Henrik Olsson)
Hi Jonathan,
Thank you for your prompt reply!
As far as I can see it works fine with this version, both when programmed with the PICStart+ and by the bootloader.

Thank you!
Sun Aug 2 2009, 09:11:41
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):