Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino32 DIY Questions
07-06-2012, 03:56 AM,
#1
Pinguino32 DIY Questions
Hi,

I have some questions about the Pingiuno32 DIY board here:

http://blog.pinguino.cc/?p=259

I'm gonna try to replicate it and play around with it. My ultimate goal is to take a shield I've designed and implemented for the ardunio and have the pic32 eventually replace the arduino component.

Here are my questions:

1. How do I program the pic32?
1.1 What do I need to program it?
1.2 How do I connect it, can I simply grab a pickit3 and implement a bread board with the minimal programming circuit they show and program it?

2. Can we update the github with programming instructions or a readme to help newbies like me get started?

3. How well is the pic32mx250f128 supported in pinguino? i.e. can I expect basic stuff in pinguino to work? Or am I venturing into mostly untested territory?

Thanks,

Dave
Reply
07-06-2012, 10:58 AM,
#2
RE: Pinguino32 DIY Questions
Dave,

Use the Pickit 3 to program the bootloader into the PIC32MX250F128B, Pickit 3 is useful for other PICs as well.
You can also use the MicrostickII to also program the bootloader.
The bootloader hex file is found in Pinguino/extra/bootloaders/32bit folder.

To use the Pickit 3 you need to install Microchip's MPLAB 8+ or MPLAB IDE X.
Start a project and import the PIC32MX250F128B_-_HID_Bootloader.hex file.
Then learn how the use MPLAB/X for programming, this is probably the hardest bit to figure out.
If you have a MicrostickII, learn the BlinkLED example.
http://www.microchip.com/stellent/idcplg...e=en556208

Re Pinguino
Blink.pde works but I/O on the MX250F128B only goes up to 12, so you need to edit PIN 13
Lots of issues with the libraries still.
Bookmark this page http://wiki.pinguino.cc/index.php/Result...e_examples

Have fun
Gavin
Reply
07-06-2012, 04:52 PM,
#3
RE: Pinguino32 DIY Questions
Thanks a lot!

Dave
Reply
13-06-2012, 01:32 AM,
#4
RE: Pinguino32 DIY Questions
Hi Gavin,

Thanks for your help!

So what I've done is setup a pic32mx250f128b in a bread board following the schematic given for the pinguino32 diy, sans an external power connector.

I'm having some success, I got the boot loader programmed and I think the boot loader works, if I hit the bootloader button followed by the reset button, the LED hooked off of RA0/AN0 goes solid, if I hit the reset button the LED goes dark again.

But I can't get ubw32 to see the board, any ideas?

So I think the bootloader is working fine, I've double checked the breadboard I have it all one and I think I've wired everything up correctly. The only thing I haven't done is added the external power supply, so I have the pic32 powered off of USB.

Thanks,

Dave
Reply
13-06-2012, 03:23 PM,
#5
RE: Pinguino32 DIY Questions
Hi Dave

To switch to bootloader mode:

hit both the reset button and the bootloader button
release the reset button
then release the bootloader button

The led should blink to indicate your are in bootloader mode.
( manip is the same on PIC32-PINGUINO-OTG )

Regards
JP

(13-06-2012, 01:32 AM)dtyree77 Wrote: Hi Gavin,

Thanks for your help!

So what I've done is setup a pic32mx250f128b in a bread board following the schematic given for the pinguino32 diy, sans an external power connector.

I'm having some success, I got the boot loader programmed and I think the boot loader works, if I hit the bootloader button followed by the reset button, the LED hooked off of RA0/AN0 goes solid, if I hit the reset button the LED goes dark again.

But I can't get ubw32 to see the board, any ideas?

So I think the bootloader is working fine, I've double checked the breadboard I have it all one and I think I've wired everything up correctly. The only thing I haven't done is added the external power supply, so I have the pic32 powered off of USB.

Thanks,

Dave
Reply
13-06-2012, 10:28 PM,
#6
RE: Pinguino32 DIY Questions
So I have a couple more questions...

JP to your point, I can't ever get the LED to blink when entering bootloader mode, it goes solid but that is it. So I assume I have still have some sort of issue.

Initially I thought I had some problems with the oscillator, but I'm less certain of that now. I can run the example blink program in MPLAB with or without the external oscillator installed, and it works both ways as expected. (I've both removed the oscillator and messed with the settings for the chip and I can get it to work as expected).

Using the pickit3 I can step through the program - so I think the bread board is working ok.

Where can I find the MPLAB source code for the Pinguino32 DIY so I can try stepping through the code to figure out where things are going wrong?

Thanks,

Dave
Reply
16-06-2012, 09:09 AM,
#7
RE: Pinguino32 DIY Questions
So I'm somewhat further along, I still can't get the Pinguino boot loader to work, but I have verified that things are working in general, I believe the issue is that there is something wrong with the USB connection.

I defaulting back to using the MPLabX IDE and writing software using it instead.

So far I've verified that my oscillator settings are correct by two different methods,

1. I've hooked up a GPS to the UART and was able to receive and send data to it and used a logic analyzer to verify that the timing looked right.

2. I used a delay function to blink an LED on and off for one second and verified that the timing (via logic analyzer) on the LED blink is almost exactly 1 second.

My next step was to utilize one of the example programs from Microchip to implement a serial over USB connection. Sadly I can't get it to work, the USBDeviceStatus gets all the way to DEFAULT_STATE, but not beyond that. I believe this might be a timing issue or something very subtle in the settings.

But I suspect the issue with the USB is what is happening with the Pinguino bootloader, but sadly I don't have the source to the bootloader so I can't verify it.
Reply
16-06-2012, 10:41 AM,
#8
RE: Pinguino32 DIY Questions
Sounds like hardware. xtal, volts, caps, etc.
Check circuit etc very very carefully.

John
Reply
17-06-2012, 08:59 AM,
#9
RE: Pinguino32 DIY Questions
Hi Dave

The problem seems to be with the USB module.

Check if VUSB ( pin 23 ) is connected to +3,3V with a 100 nF capacitor to GND.
Check if VCAP ( pin 20 ) is connected to a 10µF and 100nF capacitor ( a tantalum capacitor is better for the 10 µF )
check if VBUS ( pin 15 ) is connected to a 100 nF capacitor

I suspect a hardware problem on your board because everything seems to be OK except USB module. If you use Linux, try a lsusb command when your Pinguino is connected ( with the bootloader programmed ) then post here the result of the command.

Jean-Pierre
Reply
26-06-2012, 07:06 PM,
#10
RE: Pinguino32 DIY Questions
(17-06-2012, 08:59 AM)jpmandon Wrote: Hi Dave

The problem seems to be with the USB module.

Check if VUSB ( pin 23 ) is connected to +3,3V with a 100 nF capacitor to GND.
Check if VCAP ( pin 20 ) is connected to a 10µF and 100nF capacitor ( a tantalum capacitor is better for the 10 µF )
check if VBUS ( pin 15 ) is connected to a 100 nF capacitor

I suspect a hardware problem on your board because everything seems to be OK except USB module. If you use Linux, try a lsusb command when your Pinguino is connected ( with the bootloader programmed ) then post here the result of the command.

Jean-Pierre

Thanks for all your help! I finally got it - it turns out VBUS had to be at 5v. So simply driving VBUS to 5v/w a 100nF capacitor to ground gets it to work. I need to do some more research, but I suspect this might be specific to the chip rev. I ended up googling the heck out of it and it seems that that is a common fix for no USB is driving VBUS to 5v.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)