Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Baud Detection [solved]
#1
The settings.inc file allows auto baud rate detection to be set.

Its says to consult the 'ERRATA' first.

Where is the ERRATA ?
Reply
#2
The erratas are found on the same page as you find the device datasheet on the Microchip website.
Reply
#3
(2011-10-08, 12:07:40)Mikael Gustafsson Wrote: The erratas are found on the same page as you find the device datasheet on the Microchip website.

Ah, I was looking in the DS30 documentation .........

Reply
#4
(2011-10-09, 10:07:17)srnet Wrote:
(2011-10-08, 12:07:40)Mikael Gustafsson Wrote: The erratas are found on the same page as you find the device datasheet on the Microchip website.

Ah, I was looking in the DS30 documentation .........

Version:2.0.4 January 2011 of ds30loader.asm works fine for me, but the new version 3.0.0 April 2011, does not, with or without autobaud.

I make a change to the comminit section to allow the use on inverted RS232;

movwf RCSTA_ ; and receive
bsf BAUDCON_,5 ;set inverted receive data
bsf BAUDCON_,4 ;set inverted transmit

Config settings are being defined manully in MPLAB and are the same but the newer version does not respond when polled by the PC.
Reply
#5
Well I started from scratch, new download of DS30.

I set the MPLAB device to 18F26k22, the same for the settings.inc, although the manual says to set the device in the line, "LIST P=18F26K22" that does not exist, so is it now set in the line "processor __18F26K22" ?

So I put the "processor __18F26K22" bit in, set the clock frequency and baud;

#define OSCF 16000000
#define BAUDRATE 38400

It does not compile, lots of errors in the config register settings. Checking back with the 2.0.4 version and the config bit settings look completly different, should they be ?

Glad I kept the 2.0.4 version, although getting the auto baud working would be good.  
Reply
#6
The configurations bits found in settings.inc is only a template. You need configure them yourself to suite your hardware and your needs.
If you prefer you can delete them from settings.inc and set them in MPLAB IDE on the menu as suggested.
Reply
#7
(2011-10-09, 23:57:06)Mikael Gustafsson Wrote: If you prefer you can delete them from settings.inc and set them in MPLAB IDE on the menu as suggested.

I tried that already, the loader does compile, but then does not work.

When I do the same with version 2.0.4 (setting the config registers in the MPLAB IDE) that bootloader works OK.
Reply
#8
I have the downloader working in normal defined baud mode now, after defining the config commands manually and adding an ansel commnd for port c.7 of UART1 (18F26K22).

Autobaud however, does not work, the GUI returns a device ID that varies from one bl test to another.
Reply
#9
Got this working now.

Once I had set then OSCCON register up to work the internal clock at 16Mhz, autobaud is working with invereted RS232.

I have a small project I am working on, space is a bit tight on the PCB for a 16Mhz xtal and two capacitors, so I was trying the autobaud as it might adjust the baud rate a bit to compensate for the normal variances in the internal clock.



Reply
#10
Great! Thanks for the information.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)