PDA

View Full Version : bootloader



pierre2030
- 1st April 2006, 09:25
hi,
-i am using bootloader to pragramme my PIC16f877A.
-but,the code i programme to it,i cant get back the result i want.......
-like

define loader user 1
define osc 20

trisA=%00000000

blink:

high porta.1
pause 1000
low porta.1
pause 1000

goto blink

end

-the outcome suppose should be the LED on and off after 1 second
-but, what i get after programme with the bootloader,the LED only on continue....
-can anyone help me with this?(i should not have this problem if i using the programmer to progrmamme the pic.)

thank u

Melanie
- 1st April 2006, 09:50
First, try PortB instead of PortA and see if it works for you.

Then go look in the DATASHEET for your PIC to discover how to switch OFF the ADC's (Analogue to Digital Converters) and the Comparators before you play with PortA again.

Like I keep saying (several times a week), nobody reads Datasheets.

inteco
- 5th April 2006, 18:36
did you put a 330ohm resistor in front of the LED, else it won't
blink.
also need to add
ADCON1 = %00000110 ' switch off all the ADC
hope this work

Ken Howell
- 24th January 2007, 03:17
make sure you have your bootloader lines tied to ground (or to power, depending on how you set up your initialization scheme) to avoid unintentionally triggering the bootloader during runtime.

Ken Howell
- 24th January 2007, 03:51
make sure you have your bootloader lines tied to ground (or to power, depending on how you set up your initialization scheme) to avoid unintentionally triggering the bootloader during runtime.

I should have said "tied through a high-value (e.g. 300k) resistor....."

Archangel
- 24th January 2007, 07:07
hi,
-i am using bootloader to pragramme my PIC16f877A.
-but,the code i programme to it,i cant get back the result i want.......
-like

define loader user 1


is this typo (define loader user 1) in your code or only here, it should read :


DEFINE LOADER_USED 1 ' Comment out if not using boot-loader

no?
Also make sure your config fuses are set correctly and check the connections to your crystal.
JS

ronjodu
- 28th January 2007, 14:18
I've noticed in several posts, some by the big guns also, the use of lower case when doing a DEFINE.
The manual says all DEFINEs must be in upper case.(DEFINE OSC 20)
I've had programs not run because of this (DEFINE osc 20) but also had some run with the lower case DEFINE.

Is this a mandatory rule or just hit or miss?

Just curious..

Darrel Taylor
- 28th January 2007, 21:24
It depends on the assembler you are using.

MPASM is case sensitive by default, and must have uppercase in the define's. (unless case sensitivity is turned off)

PM is not case sensitive, so it can take either upper or lower.

But since you don't know what other people are using, anything posted on the forum should be uppercase. (just a request)
<br>