Quoting Ernst Bachmann <[EMAIL PROTECTED]>:

>
> It looks to me like you scramble the flash contents while uploading it.
>
> Some ideas where to start looking:
>
> Did you try to re-read the flash contents of the pic and compared them with
> the original hex?

Yes, I use the PICKit2 programmer by Microchip, it's MS Windows user interface
automatically verifies the flashing process.


>
> the ICSP Lines have to be very short or shielded.
>
> try to flash at a lower speed.
>
> if you're using a home-brew ParallelPort programmer, use a very short cable
> to
> connect it (I'm using a 30cm cable, everything longer only works at extremly
> low speed).
>
> check if the programming voltage is stable and not to low/high.
>

I am going to assume that the programmer works perfectly, since it is a
shrinkwrapped product from Microchip. The programming lines from the programmer
to the chip are very short, maybe a centimeter or two, from the 6-pin header to
the chips feet.

Why the PIC starts up in random modes I don't know, it may be because of a too
slow power-up time (filter caps, that will be sorted out later), but my
suspicions lie more on that perhaps I have missed something trivial, like wrong
hex file format, wrong runtime library or something else I don't understand. It
works OK much of the time, so I'll have time to debug that later.

The most important problem, however, is that I still haven't figured out why I
can't send an unsigned char (or anything else for that matter) as a parameter
with a function call. If i call the above function LCDputc(0x41);, the function
seems to receive 0x00 instead. If I hardcode the LCDputc() function to put out a
specific character, i.e. give the char c a value inside the LCDputc() function,
it prints out exactly that, no problem.The same goes for all other functions
too.

As for sending a string (a pointer) as an argument, I think work is in progress
on that...?


Thank you,

Robert Bergfors



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to