Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:52 01 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Help with compiling maximite code

     Page 1 of 2    
Author Message
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 10:54am 07 Jul 2011
Copy link to clipboard 
Print this post

Hi Guys,

I just finished building up a maximite from a PCB purchased from Trippy Ben.

Tonight I tried compiling the maximite code in MPLAB, I am getting "Link Step Failed".

I'm an assembler programmer so this is my first foray into C so I might be doing something stupidly easy to fix, but it is eluding me.

Any help would be greatly appreciated.

Dave
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 11:06am 07 Jul 2011
Copy link to clipboard 
Print this post

Dave,

Are you trying to compile it for a reason, or just want to load the PIC with the Maximite code?

If the latter, all I did was to download the 2.1 + Bootloader hex file from Geoff's site and program the PIC with the PicKit3. I then upgraded to 2.4 via the method Geoff outlines. No compiling is needed.

See here, the procedure is the same, even though the hardware is a bit different..



- Rob.
For crying out loud, all I wanted to do was flash this blasted LED.
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 11:15am 07 Jul 2011
Copy link to clipboard 
Print this post

Dave, I ran into a similar problem. I cant remember the exact details, but there are 2 different c compilers on the website. you might also want to check a post I made about problems that I had compiling code. you cant use a compiler more modern than 1.11b. Geoff left a message in the other topic with a link to the older versions of the c compiler. I seem to remember that I had to install the compiler before mplab. I dont think I am using the compiler that comes packages with mplab.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 01:30pm 07 Jul 2011
Copy link to clipboard 
Print this post

Excellent, thanks guys.

I will just download the hex file for now.

I have another 4 PIC32 chips that I plan to use for some robotics projects so I need to get the compiler going, I will check out the V1.11b compiler, I think I installed 2.0.

Dave
 
Gadget
Regular Member

Joined: 22/06/2011
Location: Australia
Posts: 70
Posted: 05:59am 08 Jul 2011
Copy link to clipboard 
Print this post

Hi Dave,

Once you have mplab and C32 installed there are instructions in the main.c source that details the required parameters that need to be set in MPLAB, also depending on whether you are within the 60days evaluation period for C32 you will need to change the optimisation from level 2 to level 1.

Terry
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 11:14am 08 Jul 2011
Copy link to clipboard 
Print this post

Now I remember why I was compiling the code. I could not get the correct micro so I got the upgraded version 795 and needed to recompile with the correct include file.

Now I'm stuck getting the pickit3 to talk to the micro. I'll have to power the board on my bench and probe around. I'm getting a "could not get devide ID" error.

Gadget thanks, I changed the optimisation to 1.

Dave
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 01:08pm 08 Jul 2011
Copy link to clipboard 
Print this post

Dave, you dont need to recompile, the hex file works fine.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
ksdesigns

Senior Member

Joined: 25/06/2011
Location: United States
Posts: 143
Posted: 02:47am 09 Jul 2011
Copy link to clipboard 
Print this post

You have to careful with the pic32's with the pickit 3 some of them will only program once and get "PK3Err0035: Failed to get Device ID" and never work again
search the microchip forums lots of people with the same problem
so always program the usb bootloader first so you don't need to use pickit 3
i had the same thing happen with a microchip pic32 touch eval board programed 3 times then dead but also have a pic32 starter kit II that i have reprogrammed 100's of times

ken
Edited by ksdesigns 2011-07-10
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 03:19am 09 Jul 2011
Copy link to clipboard 
Print this post

Thanks Stuart.

I installed 1.11b and can now compile the source, although I will use the hexfile once I work out why I can't talk to the chip.
-------------------------------------
Hooray, It's programmed and verified. I had made up a special cable to connect the pickit3 to the maximite, I checked the orientation again and again and all along it was around the wrong way.

Doesn't boot up, but now I can move forward.

Dave


 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 07:40am 09 Jul 2011
Copy link to clipboard 
Print this post

Dave, I had a lot of trouble getting mine to go with the boards that I purchased from batchpcb. It appears that the capacitor from Vcap to ground must be a low ESR tantalum. Not knowing this I was probing around the supply rails one day and shorted Vcap(pin 56) to vdd(pin 57) +ve end to pin 57 and it booted.
As a workaround, I ended up adding a 22uF tantalum capacitor from Vcap to Vdd +ve end to pin 57 . This simulates Vcap being briefly shorted to Vdd and it boots fine. I've done it on both with great success.

You can connect it between the +ve ends of C5 and C8.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 11:00am 09 Jul 2011
Copy link to clipboard 
Print this post

Stuart, Brilliant!

I didn't have a 22uf handy but I tacked a 47uf across the pins and the power LED came on, connected up to my monitor it's working. Now I just need to find a PS2 keyboard.

Thanks mate and thanks everyone for their help.

I'll pick up some low ESR caps on Monday and replace the one on the PCB.

Dave
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 01:17pm 09 Jul 2011
Copy link to clipboard 
Print this post

Dave, I could only get a 25v tantalum for my original boards, and it appears that the 16v one specified would have worked ok. I haven't had a chance to swap it out and see if that negates the need for the extra capacitor.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 01:07am 10 Jul 2011
Copy link to clipboard 
Print this post

I have a 16v 10uf tant in my board. Looking on element14s site, I can't find a tant of that description less than 5ohms.

Altronics have low ESR electros listed but don't mention the actual resistance.

Dave
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 02:58am 11 Jul 2011
Copy link to clipboard 
Print this post

Just installed a 10uf ESR electro in C5, everything boots fine.

Don I see you have the tip about C5, I should have looked there first.

Dave
 
seco61
Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 205
Posted: 04:18am 11 Jul 2011
Copy link to clipboard 
Print this post

Hi All.

I have 3 of the PCB's that Ben (trippyben) supplied fitted with PIC32MX795F512H chips.

All of these boards would not run MMBasic when first loaded. After some trouble shooting using a dummy program, I determined that the chips would not run if the clock speed was greater than about 40MHz. This led me to investigate the power rails and decoupling.

The power rails are VERY noisy and good decoupling is essential. The power rails are just a thin track running around the board.

After some experimentation, the solution to my woes was to add a low ESR ceramic SMD 10uF capacitor between the Vcap/Vcore line (pin 56) and ground. I placed it by scraping of some of the solder resist from the track and soldering one end of the cap to that and then ran a wire from the other end to the bottom of JP2. (PCB Picture)

I have also added some other caps around the PCB, including one across the USB power rails.

I also have an Altronics kit and it worked with the standard parts. Comparing the PCB's, there appears to be slightly more space between parallel tracks on the Altronic's PCB. I would also like to know what copper weight the PCBs have been made with.

As an aside, I would like to implement serial comms on the maximite (and also PWM), but the 26 pin IO connector does not provide access to appropriate pins on the MCU to use the on chip modules. As can be seen in the photo link above, I have added a couple of extra connectors to the PCBs and have soldered the spare IO pins on the MCU to the connectors (using wire wrap wire - I find this great for soldering to 0.5mm spaced pins on TQFP chips). This provides me with access to the on-chip resources.

regards

Gerard Edited by seco61 2011-07-12

Regards

Gerard (vk3cg/vk3grs)
 
Dave Everett
Regular Member

Joined: 24/06/2011
Location: Australia
Posts: 43
Posted: 04:35am 11 Jul 2011
Copy link to clipboard 
Print this post

Good info Gerard.

I spoke too soon, I did get one boot, but it stopped booting from then on. I have had to put the 47uf back in. I'll apply the scope later and see if I can sort out the power rail noise. Hopefully that will help.

Dave
 
trippyben

Regular Member

Joined: 26/06/2011
Location: Australia
Posts: 91
Posted: 10:20am 11 Jul 2011
Copy link to clipboard 
Print this post

G'day Guys.

The PCB's I had made and sold recently are 35um copper weight on 1.6mm thick FR4 fibreglass.

More on their way very soon - just been shipped from the supplier!

I've found 0.25mm enamelled copper wire good for adding extra (and fixing routing errors!) on SMD boards. It's fine enough to solder on without getting in the way and no insulation stripping issues. It can also be routed and glued in place quite well.

Regards
Ben
 
trippyben

Regular Member

Joined: 26/06/2011
Location: Australia
Posts: 91
Posted: 10:28am 11 Jul 2011
Copy link to clipboard 
Print this post

Hey Gerard, secondary question - what chips are Altronics supplying with their kits pre-loaded on the PCB?

Ben
 
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 11:20am 11 Jul 2011
Copy link to clipboard 
Print this post

Altronics are supplying PIC32MX695 chips.

Stuart
Time is nature's way of keeping everything from happening all at once.
 
trippyben

Regular Member

Joined: 26/06/2011
Location: Australia
Posts: 91
Posted: 11:45am 11 Jul 2011
Copy link to clipboard 
Print this post

Does anyone with homebrew maximites have C5 troubles using a 695?
 
     Page 1 of 2    
Print this page
© JAQ Software 2024