www.robowars.org

RoboWars Australia Forum Index -> Technical Chat

Reccomendations for a PIC development system
Goto page 1, 2  Next

Post new topic   Reply to topic
  Author    Thread
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  
Reccomendations for a PIC development system

I am finally thinking about learning to use PIC chips; what is a good suggestion for an easy to learn and use development environment? I would rather go for ease of use rather than low cost. the chip family doesn't have to be particularly powerful either, just widely used with plenty of support. Oh, I hate C code BTW Smile
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Thu Jun 26, 2008 10:05 am 
 View user's profile Send private message
Fish_in_a_Barrel



Joined: 30 Sep 2006
Posts: 673
Location: Perth, Western Australia


 Reply with quote  

MPLAB is free from microchip and just takes assembly. And I think that the development hardware is reasonably priced these days. See if you can get something with an in circuit programmer.
_________________
They say that he crossed the fine line, from insanity to genius.

Post Thu Jun 26, 2008 11:40 am 
 View user's profile Send private message MSN Messenger
Knightrous
Site Admin


Joined: 15 Jun 2004
Posts: 8511
Location: NSW


 Reply with quote  


quote:
I would rather go for ease of use rather than low cost. the chip family doesn't have to be particularly powerful either, just widely used with plenty of support.


PICAXE is pretty hard to walk past for ease of use... Although, I've taken a real lovin to the AVR's, playing with them and using BASCOM compiler to write the code is very easy. If you consider the AVR's, check out the Baby Orangutan's and USB programmer combo from Pololu for $50 USD. You can also use the trial version of Bascom to compile up to 4K of code.
_________________
https://www.halfdonethings.com/

Post Thu Jun 26, 2008 12:44 pm 
 View user's profile Send private message
Spockie-Tech
Site Admin


Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia


 Reply with quote  

Depending on your goals, The AVR/Atmel family might be worth considering as well. Each has plus and minuses.

My impressions after comparing the two are that Atmel/AVRs are more popular in the younger, DIY, Open-source, and power/$ area. Their internal architecture and instruction set is more logical and understandable. Google "Arduino" for some nifty examples of the types of development widgets and environments available

The PIC range seems to a bit more popular in older-school developers, there are more commercial-tools available for them (often at big $ prices), and they have some strange architectural quirks and programming techniques that are probably a result of legacy design compatibility choices since they are older than the AVRs (afaik).

Using a high level language/interface like PicAxe's or GCC can mask a lot of the weirdness of either range for you. If you are going to work with Jake, He likes PIC's runing JAL. I like the feel of the AVR community better myself (www.avrfreaks.net)

As a generalisation, to me, The Pic People feel like the Windows community.. Lots of commercialisation, trade-secrets, proprietary, do it by buying our $ gadget stuff. The AVR people feel more like the Linux, open source, help newcomers, here are the schematics to DIY type. Thats just my subjective impression of the two though. Hardware wise, both are equally capable.

www.dontronics.com (Australian but pricey), www.sparkfun.com www.olimex.com www.avrfreaks.net are good sources for every dev widget you can think of in both familys
_________________
Great minds discuss ideas. Average minds discuss events. Small minds discuss people


Last edited by Spockie-Tech on Thu Jun 26, 2008 4:43 pm; edited 1 time in total

Post Thu Jun 26, 2008 12:57 pm 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  

Gold plated advice - thanks guys! I'm not going to jump one way or the other without some research, but the AVR direction looks appealing. Thanks for the links too, I can see my workshop productivity crashing for the next few days Smile

Would I be right in saying that interfacing to AVRs and PIC will generally be similar IE I could pinch I/O circuits from one family and adapt to the other?
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Thu Jun 26, 2008 1:50 pm 
 View user's profile Send private message
Spockie-Tech
Site Admin


Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia


 Reply with quote  

In general yes. An I/O pin is a I/O pin regardless of the family.

There might be some minor differences wrt to Analog/Digital convertors, inbuilt special functions (PWM, Interrupts) and the like.. but they vary just as much from model to model within each family as they do across the families anyway. Some chips have more current drive capability, some have lower power consumption, or more sensitive ADC's etc.

If theres any tricky analog interfacing going on, you want to check the data for the particular chip you are using, regardless of family, but for basic I/O tasks like driving other chips, Leds, Relays etc, they are fundamentally the same.
_________________
Great minds discuss ideas. Average minds discuss events. Small minds discuss people

Post Thu Jun 26, 2008 1:59 pm 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
dyrodium
Experienced Roboteer


Joined: 24 Aug 2004
Posts: 6476
Location: Sydney


 Reply with quote  

Nick, you might want to look at getting an evaluation kit in either PIC or AVR depending on what you go for. I have the avr butterfly as well as a whole walk through book on using it to learn C from http://smileymicros.com/. The guys style of writing is great and i've gotten some LED's blinking in series. Simple program, but i've run out of time to progress further. It has the advantage in that all the osrc based esc's use them. I'm sure the other guys have already answered your questions but i'm in Cairns and speedreading. Smile
_________________
( •_•)

( •_•)>⌐■-■

(⌐■_■)

YEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH

Post Thu Jun 26, 2008 3:45 pm 
 View user's profile Send private message Visit poster's website MSN Messenger
Valen
Experienced Roboteer


Joined: 07 Jul 2004
Posts: 4436
Location: Sydney


 Reply with quote  

IF your starting afresh AVR is the way I'd go.
PIC's are probably a little more robust and have got more herbs in terms of built in peripherals PIC's have quite good I/O pin drive currents and will run at 135C (don't ask how i know that ;->). But AVR's have speed coming out their ears and loads of free development tools.

With regards development kits etc, mostly they are just overpriced crap, Get a decent in circuit programmer and a few chips. All your flashy light stuff you can do on a breadboard (solderless)

The most important thing to get working is serial communication back to your PC and possibly debugging. Once you have serial coms though your debugging becomes *much* easier. Either use a max232 and a real serial port or one of the FTDI chips. Put one of them in a box with 2 plugs on it and you can use it with all your projects. (5vttl serial > computer converter)
_________________
Mechanical engineers build weapons, civil engineers build targets

Post Sat Jun 28, 2008 10:46 am 
 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  

Sounds like good advice, the dev boards I looked at had stuff I wouldn't use in a real application. would a board with USB have any advantages, other than ease or use? I think the spare PC I was planning to use is a "legacy free' model, with just Ethernet & USB ports.

Are any of those solderless breadboards better than others? I remember having trouble with one a few years ago.

I ordered a couple of interfacing books off Amazon yesterday but the rest of the dev system will have to wait until the next pay day
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Sat Jun 28, 2008 1:30 pm 
 View user's profile Send private message
seanet1310



Joined: 08 Nov 2006
Posts: 1265
Location: Adelaide


 Reply with quote  

prob a bit late but anyway

I dont think my uni teaches PIC these days we seam to mostly do AVR talking to a couple of students i know who have done it foud it prity easy so sounds like the way to go(i dont rearly get to use them untill semester 2 this year)

Post Sat Jun 28, 2008 4:18 pm 
 View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  

Thanks again for all the advice - I finally decided to go with the PIC family. I found more relevant info on PIC chips and I liked the look of the development tools. There are some text books on the way and after the next pay day, I will set up a simple lab - I only have two projects in mind but who knows?
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Tue Jul 01, 2008 6:12 pm 
 View user's profile Send private message
Valen
Experienced Roboteer


Joined: 07 Jul 2004
Posts: 4436
Location: Sydney


 Reply with quote  

Don't know how much you need in the way of text books.
The datasheets are pretty solid, JALv2 now has some support for 18F series chips.
You can get a LED flashing in a few minutes with the examples.
From there all you really need to mess with is the PWM output module.
hard part is reading the incoming servo pulses.
_________________
Mechanical engineers build weapons, civil engineers build targets

Post Tue Jul 01, 2008 7:07 pm 
 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  

I got one basic book on PICs and two on interfacing and general analogue circuit design - I was never much good at that and anything I might have known has not been used for years. For the main project, I found a great design note: http://ww1.microchip.com/downloads/en/AppNotes/00847a.pdf - it really doesn't get easier than that! The circuit described needs way more power handling and the brake & BEC circuits need to go but this could form a great baseline for my 'Super SSR'.
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Tue Jul 01, 2008 7:36 pm 
 View user's profile Send private message
Spockie-Tech
Site Admin


Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia


 Reply with quote  

That Ap note is a good broad overview of the general principles involved in single direction low power ESC design, but the gate drive section is not even in the ballpark for high current use.

a Pull-Up resistor on the gate (to charge it), with a simple pull-down transistor opposing it has no chance of pumping the current in and out of the gate capacitance fast enough to bring the Fet anywhere near its maximum current rating (by minimising switching time).

Indeed their test results show a 500nS rise time and 1000nS fall time for the gate, which is too long for pushing a Fet to its limits. You want to be thinking down in the 10's of Nanoseconds, not hundreds to thousands.

Also, remember its not the 0 to saturation times that matter, but the threshold-to-saturation, since below threshold the Fet isnt conducting at all, so its not burning power.. once you get over the threshold voltage, then you need to hurry things along into sat. at high power levels

OK for a little 10amp ESC, but pulling peak currents of 100amps with switching times like that will result in rapid "mesoplasma formation" (yes, thats a real term Smile - inside your fet causing significant device derating, even extrapolating to zero functionality (this verbiage is from an IRF datasheet Smile )

The gate needs a very low impedance drive so it can move charge in and out quickly, pull-up and pull-down resistors are not low impedance.

Other than that point, it overall looks good
_________________
Great minds discuss ideas. Average minds discuss events. Small minds discuss people

Post Wed Jul 02, 2008 12:59 am 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Nick
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW


 Reply with quote  

Agreed, the FET drive section needs a major steroid injection. Either some largish transistors (darlingtons?) or Jake's fave FET driver, also made by Microchip. Remember that the ony function of the PWM is limiting start-up current and the controller would go to 100% duty cycle after around 2 to 5 seconds; switching times don't have to be cutting edge (pun intended) to be acceptable in this application. It looks like Jake's driver would switch a bank of FETs in 100 nS or less. I would be going for the lowest switching frequency, which should ease the requirements for the FET drive a little.

The other issue is the working voltage range. I need 20 to 25V, but I can see this circuit being useful in larger bots at 36 to 48V. I get the idea that an RC snubber circuit across the output might be a good idea too.

I see the project evolving in two parts - getting the PIC code to work and getting the FET drive right. I would probably build the power side as an SSR to begin with, and run it via an opto-isolator. It's a fairly long-term project and I am mainly doing it to get involved with microcontrollers - if it never works properly, the learning experience will still be worth it.
_________________
Australian 2015 Featherweight champion
UK 2016 Gladiator champion

Post Wed Jul 02, 2008 1:31 am 
 View user's profile Send private message
  Display posts from previous:      

Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 2

Goto page 1, 2  Next

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Last Thread | Next Thread  >
Powered by phpBB: © 2001 phpBB Group
millenniumFalcon Template By Vereor.