ds30 Loader free edition forums
Problems using UART with Bootloader on PIC18F4523 [abandoned] - Printable Version

+- ds30 Loader free edition forums (https://picbootloader.com/forum)
+-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3)
+--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7)
+--- Thread: Problems using UART with Bootloader on PIC18F4523 [abandoned] (/showthread.php?tid=410)



Problems using UART with Bootloader on PIC18F4523 [abandoned] - cmotif - 2011-09-01

Hi,

I am trying to send out ASCII via UART for my PIC18F4523. However it does not seem to work. Everything was done using the latest version (20 august 2011)

Is it possible to use the pic UART for comms, with the same UART port of the bootloader on the chip? If it cannot be done just ignore the below:

Steps I have taken so far:

1. edited the settings.inc and flashed my pic with ds30 project using the microchip ICD3 programmer.

2. added the goto instruction in my main code.

3. loaded the hex file into the ds30loader GUI. I can find the bootloader when i click on the 'Check BL'

"
Searching for bl .
Found PIC18F4523 fw ver. 3.0.0
"

4. manually reset the pic by power cycling the chip and flashed the new hex file within 2 seconds of reset (This is what i read on your recommendation in other threads for manual reset)

Without the bootloader I can get the PIC to echo whatever i send over the console.

I have attached the files I have used.
1. Firmware Ver 0.1.hex is the hex file I uploaded with ds30loaderGUI.exe
2. ds30loader.HEX is the file I flashed for the inital bootloader
3. main.c is the source for Firmware Ver 0.1
4. settings.inc is the ds30 bootloader settings file
5. serial.c is the source file containing the register init for the Firmware Ver 0.1

I hope you can help me with this.

Thanks!


RE: Problems using UART with Bootloader on PIC18F4523 - Mikael Gustavsson - 2011-09-04

Hi,
How do you configure set the configuration bits for the boot loader?
Do you use the same configuration bits in boot loader and application? (you should)
Do you write configs? (you shouldn't)



RE: Problems using UART with Bootloader on PIC18F4523 - cmotif - 2011-09-05

(2011-09-04, 19:06:59)Mikael Gustafsson Wrote: Hi,
How do you configure set the configuration bits for the boot loader?
Do you use the same configuration bits in boot loader and application? (you should)
Do you write configs? (you shouldn't)

Hi thanks for the reply!

I specified the configuration bits for the bootloader inside MPLAB's configuration menu instead of inside the code (hence those fields are commented).

I have used the same configuration for both bootloader and my code itself.

The write config check box is greyed out and disabled for me so I cannot write configs accidently even if i want to.


RE: Problems using UART with Bootloader on PIC18F4523 - Mikael Gustavsson - 2011-09-09

Hi,
I'm sorry for the late reply. I am very busy at the moment.
Try to clear all relevant registers and bits before you configure the uart, txsta, rcsta, baudcon interupt flag etc
What are the register values when the uart doesn't work?