MCLoader baud rate


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default MCLoader baud rate

    I see that some of you have been disassembling MC Loader. Awhile back, I did the same thing in order to change some time delays and jump vectors. But one thing I could never figure out -

    In the PLL_18F8722_40.HEX file, MCLoader loads 0x81 into W at location 1FD06, and calls a routine that loads that literal into SPBRG. This would indicate that MCLoader is trying to run at 19.2K, but in actuality, my RS-232 sniffer shows it is running at 115K when I actually perform a bootload. Speed tests indicate the same. If I choose 19.2K in the OPTIONS of MCLoader, my code takes a long time to load (my .HEX files are all around 350K), but if I choose 115K, the code loads at normal speed.

    I checked to see if bit 0 in BAUDCON1 was set anywhere, (which puts the chip in auto baud mode), but couldn't find any reference to that location. Can anyone shed some light on this discrepancy? I need the PIC side of MCLoader to run at a different baud rate (57.6K).
    Charles Linquist

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I need the PIC side of MCLoader to run at a different baud rate (57.6K).
    The only options in the MicroCode Loader PC application are 19200 and 115200.

    If you could modify the PIC program for 57600.
    How would you get the PC to do the same?

    ?
    DT

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    My goal is to bootload over Ethernet.

    I'm using a Lantronix Xport that talks to the PIC at 57600. If I can get the "PC side" of MCLoader to work through a serial <-> Ethernet converter, I'll use it. If not, I think I
    know enough of the protocol to write an application in VB.

    I can't easily change the baud rate between the XPort and the PIC, but I can
    patch MCLoader (PIC side) with a program that I bootload load over RS-232 (the first time) - I have done a similar patch before. After the bootloader is patched, hopefully I can bootload over Ethernet. The goal is to set all this in motion with one "bootloaded" (over RS-232) upgrade.
    Charles Linquist

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Charles Linquis , I too am interested in boot loading over my Ethernet connection. I too am using Xport RS-232 to Ethernet converters and have had great success using them to control my Solar Array Trackers over the internet when I am away. It would be so much easier to be able to boot load new code into the Trackers without having to use the direct RS-232 connection. Please keep me informed as to your progress... Thanks...

    Dave Purola,
    N8NTA

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    PLL_18F8722_40.HEX

    Hmm, I don't seem to have that one.
    There's a bunch of PLL_18Fxxxx_xx.hex, but that's not one of them.

    Was it a special order?
    DT

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Darrel Taylor , I have had my copy of PLL_18F8722_40.HEX since 04/26/2005... I have used it to run one of the microchip demo boards I got a long time ago.. Charles, I only wished that MCLoader had the capability of changing the baud rate for the boot loader. I use 38400 and 57600 baud for my data and control transfers. Today I plan on using the port redirector to setup a port for MCLoader and see if I can get some activity on one of my projects using a NET-232 Jr. The only problem I can see is the latency for the handshaking during the loading process. I have had some success using TinyLoader in the past as I was able to go into the free source and add to the handshaking latency as well as change the baud rate values.. I'll keep you informed as to my progress...

    Dave Purola,
    N8NTA

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I, too have had latency issues, and added a 24 bit delay counter right after the first jump. I set the jump vector at location 0 to jump past the end of MCLoader, pause for awhile, then jump to the beginning of MCLoader. That improved the reliability of my loads, since I use only a two-wire setup (I don't control MCLR), and bootload only on power-up.
    I also modified the loader to change MCLR to a "normal" input, and then check the status of that pin before running the bootloader. If the pin was LOW, jump to the bootloader. If the pin was high, go to the bootloader's vector location and jump directly to the program without trying the bootloader. It was a "write protect" function.
    Charles Linquist

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    I have had my copy of PLL_18F8722_40.HEX since 04/26/2005...
    Hey Dave and Charles, for some reason, I don't have that file either. A while back I got permission from Mechanique to post their mcloader hex codes. Looks like I might be missing a bunch myself. There are 160 files in my folder.

    http://www.picbasic.co.uk/forum/cont...Bootloader-Hex

    Do you think you could zip up your MicroLoader hex files, and email them to me, so I can post them for others?
    Last edited by ScaleRobotics; - 13th July 2010 at 15:09.

  9. #9
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Charles, I did some testing today with the program I am trying to be able to bootload over the internet. Mind you I am only doing it for the time being over the local Ethernet. If I use the port redirector that was shipped with my NET-232 set to port 3 and the IP address of the NET-232 I am able to communicate with it. I also have a command in the program to BOOT the 18F2620 after a 10 second delay. That gives me time to shutdown the telnet program and start the MCLoader program. After the 10 seconds have elapsed I am able to get the ID information from the MCLoader program but when I try the bootloader it hangs. I took a scope and looked at the RS-232 lines to and from the 18F2620 and found that indeed the MCloader program and the 18F2620 were communicating but the characters wern't changing. I am going to take a look at the source hex file for the boot loaded code in the 18F2620 tomorrow and see what the problem might be... That is all I had time to do today...

    Dave Purola,
    N8NTA

  10. #10
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I might get a chance to do some testing myself tomorrow. A useful tool is

    http://www.serial-port-monitor.com/f...downloads.html
    Charles Linquist

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts