use the PIC24HJ64GP502 Microstick with Bully Bootloader

207 views
Skip to first unread message

Saju Jose

unread,
Feb 7, 2014, 6:23:01 PM2/7/14
to pic24-assemb...@googlegroups.com
Hey everyone,

I am trying to use the  PIC24HJ64GP502 Microstick for a project and I want to use the Bully Bootloader so I can reprogram my device using this GUI. However I keep getting this error message from the GUI:
Unable to connect to device, giving up.

Reading Target Device ID
Exception during serial port read: The operation has timed out.
Unable to connect to device, giving up.

I've tried so many different ways of doing this but nothing ever worked. I wonder if it because I'm not using the USB to TTL cable that I'm always seeing.  I'm using a Comm-Front TTL33-232-1 converter. So instead of USB to TTL, its RS232 to TTL. I would find it hard to believe that using a different cable would be the reason why this isn't working. Any help on this would be much appreciated. 

Robert Reese

unread,
Feb 8, 2014, 4:12:50 PM2/8/14
to pic24-assemb...@googlegroups.com
Did you program the PIC24HJ64GP502 with the bootloader firmware?  If yes, what is the pathname to the file that you used in the code archive?




--
You received this message because you are subscribed to the Google Groups "PIC24 Assembly-to-C Book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-...@googlegroups.com.
To post to this group, send email to pic24-assemb...@googlegroups.com.
Visit this group at http://groups.google.com/group/pic24-assembly-to-c-book.
For more options, visit https://groups.google.com/groups/opt_out.

Saju Jose

unread,
Feb 9, 2014, 1:04:42 AM2/9/14
to pic24-assemb...@googlegroups.com
Yes I'm pretty sure I did. MPLAB told me that the program was loaded successfully. Is there a way to check that besides if the whole thing works? 

And I don't have the computer I used on me right now. As soon as I can get a hold of it, I will post the pathname for you.

Thanks


On Saturday, February 8, 2014 4:12:50 PM UTC-5, Robert Reese wrote:
Did you program the PIC24HJ64GP502 with the bootloader firmware?  If yes, what is the pathname to the file that you used in the code archive?


On Fri, Feb 7, 2014 at 5:23 PM, Saju Jose <saju....@gmail.com> wrote:
Hey everyone,

I am trying to use the  PIC24HJ64GP502 Microstick for a project and I want to use the Bully Bootloader so I can reprogram my device using this GUI. However I keep getting this error message from the GUI:
Unable to connect to device, giving up.

Reading Target Device ID
Exception during serial port read: The operation has timed out.
Unable to connect to device, giving up.

I've tried so many different ways of doing this but nothing ever worked. I wonder if it because I'm not using the USB to TTL cable that I'm always seeing.  I'm using a Comm-Front TTL33-232-1 converter. So instead of USB to TTL, its RS232 to TTL. I would find it hard to believe that using a different cable would be the reason why this isn't working. Any help on this would be much appreciated. 

--
You received this message because you are subscribed to the Google Groups "PIC24 Assembly-to-C Book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-c-book+unsub...@googlegroups.com.

Saju Jose

unread,
Feb 9, 2014, 1:07:36 AM2/9/14
to pic24-assemb...@googlegroups.com
Yes I did. Is there a way to check whether it is properly loaded besides getting everything to work? 

And I don' t have the computer I used on me. I will give you the path name as soon as I can.

Thanks

On Saturday, February 8, 2014 4:12:50 PM UTC-5, Robert Reese wrote:
Did you program the PIC24HJ64GP502 with the bootloader firmware?  If yes, what is the pathname to the file that you used in the code archive?


On Fri, Feb 7, 2014 at 5:23 PM, Saju Jose <saju....@gmail.com> wrote:
Hey everyone,

I am trying to use the  PIC24HJ64GP502 Microstick for a project and I want to use the Bully Bootloader so I can reprogram my device using this GUI. However I keep getting this error message from the GUI:
Unable to connect to device, giving up.

Reading Target Device ID
Exception during serial port read: The operation has timed out.
Unable to connect to device, giving up.

I've tried so many different ways of doing this but nothing ever worked. I wonder if it because I'm not using the USB to TTL cable that I'm always seeing.  I'm using a Comm-Front TTL33-232-1 converter. So instead of USB to TTL, its RS232 to TTL. I would find it hard to believe that using a different cable would be the reason why this isn't working. Any help on this would be much appreciated. 

--
You received this message because you are subscribed to the Google Groups "PIC24 Assembly-to-C Book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-c-book+unsub...@googlegroups.com.

Robert Reese

unread,
Feb 9, 2014, 10:37:08 AM2/9/14
to pic24-assemb...@googlegroups.com
I downloaded the latest archive (the one based on MPLAB-X), from this link:
http://www.ece.msstate.edu/courses/ece3724/main_pic24/labs/files/pic24_code_examples.zip

 and the path in this archive is:
pic24_code_examples/hex/p24hj64gp502_bootloader.hex

The baudrate for this will either be 230400 (most probably) or 57600.

Alternatively, you can download the older MPLAB archive from this link:
http://www.ece.msstate.edu/courses/ece3724/main_pic24/labs/files/pic24_code_examples_mplab8.zip

This archive also has a hex/ folder, and the hex files in this archive identify the baudrate.  The bootloader has not changed for the PIC24H devices between these two archives, both are compatible.

On the PIC24H, the TX pin is RP11(PIN 22), and the RX pin is RP10 (pin 21). The PIC24H TX pin must be connected to the PC RX pin, the PIC24 RX pin to the PC TX pin. You also have to connect the ground from the RS232 adapter that you are using to the ground of the microstick.

It does not matter if you use a RS232 adapter cable of some form or the USB-to-Serial cable that we use, as long as the voltage levels going to the PIC24 are CMOS levels (either 3.3V or 5V will work, as these pins are 5V tolerant).


Once you have the firmware loaded into the PIC24 and the physical connection made between the PIC24 and the PC, then compile a sample project (I always used chap8/reset ) and point Bully Bootloader at the resultant hex file using the 'hexfile' button.  Then, power up the PIC24, and within two seconds, click on the 'Program' button in the BullyBootloader. The firmware only looks for incoming data over the serial port for 2 seconds after either reset or powerup before it  jumps to a user application that has already been downloaded via the bootloader.

If you get the message about unable to read the Target Device ID, then this means that the bootloader GUI did not get the expected response back from the PIC24 when it tried to establish the initial handshake. This could be because of:
 a. Firmware not loaded
 b. Baudrate wrong.
 c. Tx/rx pins are reversed or are not connected to the correct pins on the PIC24.


I have not verified this on the Microstick in a long time, but the last time I checked, it worked fine.  I will try to do that again early this week.




To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-...@googlegroups.com.

Saju Jose

unread,
Feb 9, 2014, 11:57:00 AM2/9/14
to pic24-assemb...@googlegroups.com
Awesome! I really appreciate you being in so much detail. I have a question though. You gave two links to download the archives. Can I assume that I need to download the correct one depending on which MPLAB IDE I use?

Also, I'm pretty sure that the TX and RX pins were hooked up properly but I'll definitly double check.

I will change the baud rate to see which one works, while hoping that the correct firmware is on. 

I will let you know if I can get it working, or if something is still wrong.

Thank you for the help.

Robert Reese

unread,
Feb 9, 2014, 12:14:28 PM2/9/14
to pic24-assemb...@googlegroups.com
Yes, the second link is a frozen archive that uses MPLAB8 -- it is frozen in the state it was in when we made the switch over to MPLAB-X.   The first link is the archive that is being actively used by us, it uses MPLAB-X.

From a bootloader firmware perspective, either archive will work since the hex/ directory just contains bootloader hex files for different targets.

Good luck on getting it working!



--

Saju Jose

unread,
Feb 10, 2014, 11:39:18 AM2/10/14
to pic24-assemb...@googlegroups.com
Hey, I still can't get it working. 

And you asked for the path to Hex file earlier. You can see it below.

 C:\Users\sjose\Documents\pic24_code_examples_mplab8\hex\p24HJ64GP502_57600baud_bootldr.hex.


On Sunday, February 9, 2014 12:14:28 PM UTC-5, Robert Reese wrote:
Yes, the second link is a frozen archive that uses MPLAB8 -- it is frozen in the state it was in when we made the switch over to MPLAB-X.   The first link is the archive that is being actively used by us, it uses MPLAB-X.

From a bootloader firmware perspective, either archive will work since the hex/ directory just contains bootloader hex files for different targets.

Good luck on getting it working!

On Sun, Feb 9, 2014 at 10:57 AM, Saju Jose <saju....@gmail.com> wrote:
Awesome! I really appreciate you being in so much detail. I have a question though. You gave two links to download the archives. Can I assume that I need to download the correct one depending on which MPLAB IDE I use?

Also, I'm pretty sure that the TX and RX pins were hooked up properly but I'll definitly double check.

I will change the baud rate to see which one works, while hoping that the correct firmware is on. 

I will let you know if I can get it working, or if something is still wrong.

Thank you for the help.

On Friday, February 7, 2014 6:23:01 PM UTC-5, Saju Jose wrote:
Hey everyone,

I am trying to use the  PIC24HJ64GP502 Microstick for a project and I want to use the Bully Bootloader so I can reprogram my device using this GUI. However I keep getting this error message from the GUI:
Unable to connect to device, giving up.

Reading Target Device ID
Exception during serial port read: The operation has timed out.
Unable to connect to device, giving up.

I've tried so many different ways of doing this but nothing ever worked. I wonder if it because I'm not using the USB to TTL cable that I'm always seeing.  I'm using a Comm-Front TTL33-232-1 converter. So instead of USB to TTL, its RS232 to TTL. I would find it hard to believe that using a different cable would be the reason why this isn't working. Any help on this would be much appreciated. 

--
You received this message because you are subscribed to the Google Groups "PIC24 Assembly-to-C Book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-c-book+unsub...@googlegroups.com.

Saju Jose

unread,
Feb 10, 2014, 12:06:39 PM2/10/14
to pic24-assemb...@googlegroups.com
If possible, would you be able to walk me through this step by step? I really don't see what I'm doing wrong.
Reply all
Reply to author
Forward
0 new messages