looking for preprogrammed arduino chips (leonardo) - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 11:30:43 am
content: I've spotted the arduino leonardo that has builtin usb comms. is it possible to get this chip or a simila arduino loaded chip as a standalone ?

author: shebu18
author_rank: Frequent Contributor
timestamp: October 11, 2012, 12:54:27 pm
content: Why don't you buy the chip and program it your self?

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 01:28:14 pm
content: yea after some digging looks like i should do that although I think it's so tiny I won't be able to work with it so needs to be on a header board.Or i need to get my head around programming a pic with C as I've got all the kit but not my head with it.

author: westfw
author_rank: Super Contributor
timestamp: October 11, 2012, 03:58:16 pm
content: There are a couple of "breakout board" type things with the same chip as leonardo.Teensy:http://www.pjrc.com/teensy/Adafruit:http://www.adafruit.com/products/296Of course, those won't cut your costs to chip levels, and you might as well get an actual Leonardo.I think microchip has the only major microcontroller family(s) with USB capability in DIP chips...

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 04:26:56 pm
content: Yea I think I'll end up developing around the UNO and getting pre-programmed chips or if I have time I'll make it with a pic programmed in C but that all depends on how idiot friendly microchips MPLAB C is. Are there any other C based development tools for pic ?

author: ivan747
author_rank: Super Contributor
timestamp: October 11, 2012, 05:59:54 pm
content: I recommend you give CCS a try. It's a good compiler with a lot of libraries.

author: bingo600
author_rank: Super Contributor
timestamp: October 11, 2012, 06:05:40 pm
content: Quote from: Simon on October 11, 2012, 04:26:56 pmDo it right (use an AVR)Well have a loook at this price (esp the 10 pcs price , or 100 pcs)http://www.modtraders.co.uk/minimus-32-avr-usb-development-board.htmlOr (better 1 off)http://mrmodchips.co.uk/catalog/minimus-development-board-p-815.htmlhttp://minimususb.com/It's an ATmega32u2 - NOT ATmega32u4 (like Leonardo)Diffs:http://electronics.stackexchange.com/questions/20652/differences-between-atmega32u2-and-atmega32u4But it's cheap , finished and .uk based/Bingo

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 06:33:08 pm
content: well as my workplace is rather thick I'll have to prototype the code myself and use my own resources. i have an arduino uno so simple solution and I have a pickit2 so can program pics, it's going to be one of those two I think

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 06:35:26 pm
content: I'm not paying over £100 for CCS

author: andersm
author_rank: Super Contributor
timestamp: October 11, 2012, 06:36:00 pm
content: The ATmega32U4 comes preprogrammed with a USB DFU bootloader you could use to program the Arduino bootloader.

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 06:36:48 pm
content: so what software environment am I using to program it ?

author: andersm
author_rank: Super Contributor
timestamp: October 11, 2012, 07:39:13 pm
content: Atmel have their own tool for Windows,dfu-programmershould work for Linux. I guess you'd have to do it in two stages - use DFU to program an application that will reprogram the bootloader area.

author: Unknown
author_rank: Unknown
timestamp: October 11, 2012, 07:56:20 pm
content: Free C compiler for some pics and other chips.http://sdcc.sourceforge.net/

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 08:00:45 pm
content: I have come across WIZ-C but the manul don't quite match the program. Anyone used it before ?

author: Smokey
author_rank: Super Contributor
timestamp: October 11, 2012, 09:24:57 pm
content: The state of the official microchip C, xc8, xc16, xc32, and MPLABX is still a bit chaotic at this point. At least that's the impression I got when I tried to use them for the first time recently. They tried to unify their compilers and their IDE, but there are still a lot of bugs to be worked out. Especially with their documentation and sample code. It seems to be mostly there but not all in one convenient place like TI msp430 stuff or Arduino. You have to do some digging and tweaking. I've called them up a couple times and had a rep do a visit and they are really helpful and say they are working hard to sort all that stuff out.As far as capability, the official microchip C compilers look to be really good though. It should be way more powerful than Arduino at the loss of simplicity. With them getting their act together as far as free official manufacturer supported compilers, I don't think it makes sense to go third party for PIC anymore. The higher end compilers are even based on gcc. So after all that complaining above, I'd say it would be worth it to learn the XC compilers from microchip in the long run.

author: Simon
author_rank: Unknown
timestamp: October 11, 2012, 09:31:23 pm
content: yea I might look at the 3 c compilers I have from microchip and try to work one out

author: senso
author_rank: Frequent Contributor
timestamp: October 12, 2012, 05:13:11 pm
content: Quote from: Simon on October 11, 2012, 06:36:48 pmThats one is pretty easy, just download Atmel Studio:http://www.atmel.com/tools/ATMELSTUDIO.aspxAnd buy a real programmer, a Dragon costs 50€, and a cheap-ass UsbAsp clone from eBay will set you back from 2-3€, then go to AvrFreaks and read some tutorials, I think that you problem is that you download only the compilers, that and you dont really read the right documentation..

author: Simon
author_rank: Unknown
timestamp: October 12, 2012, 05:43:13 pm
content: Unfortunately there is documentation coming out of my ears, if microchip could be as good as to provide the most essential documentation first and then follow on with the more complex staff I might actually make a start.

author: Unknown
author_rank: Unknown
timestamp: October 12, 2012, 06:45:06 pm
content: Just out of interest, which uC are you going to roll with?

author: Simon
author_rank: Unknown
timestamp: October 12, 2012, 06:46:32 pm
content: erm, 16F88 as jelly bean choice, I know it's not the best performing in C but this is a slow motion system so speed is no issue, but I'm open to suggestions, I have some around so can do a flashing led program

author: Unknown
author_rank: Unknown
timestamp: October 12, 2012, 09:49:10 pm
content: Here's an easy workflow... assuming your windows.(1) Register with Microchip and install hi-tech c compiler lite (free) version for pic16 (Remember to tick add to environment path in the install options.)http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en542849(2) Once installed open up a command prompt and type "PICC" you should get a response from the compiler if it's properly installed; close the command line window.(3) Open up your favourite text editor and create some code in a file called "led.c" like...Code:#include <pic.h>void delay() {int i;for(i=0; i<10000;i++) {asm("nop");}}void main() {TRISA = 0;while(1) {RA0 = !RA0;delay();}}(4) To compile, create a .bat file call it "build.bat" and add the following, run the bat file then just burn the hex file. (Config XT, Watchdog OFF)Code:picc -16f84a led.cpause(5) Create your test circuit, use a 4Mhz crystal, put you LED on RA0...and then another little baby blinky is born! ahhh just look at him; isn't he cute! he looks like his dad you know.

author: Simon
author_rank: Unknown
timestamp: October 12, 2012, 09:51:57 pm
content: cool, so is there any actual C coding environment in MPLAB or am I just using it's text exditor to throw C at the C compiler (I have C18 on this)

author: Unknown
author_rank: Unknown
timestamp: October 12, 2012, 10:03:56 pm
content: Quote from: Simon on October 12, 2012, 09:51:57 pmIn that example I just used notepad basically to describe how easy it is to get started, and to show you don't need a full blown IDE (MPLAB) to get up and running and actually compiling code. The most important thing is getting your workflow setup and running, whether it be an IDE or a text editor.

author: Simon
author_rank: Unknown
timestamp: October 12, 2012, 10:05:03 pm
content: well I'm hoping the IDE will make things a bit easier and give me a few tools like library inegration

author: Smokey
author_rank: Super Contributor
timestamp: October 14, 2012, 09:09:41 pm
content: Mplabx is pretty good as far as an ide. Way better than mplab8.

author: Simon
author_rank: Unknown
timestamp: October 14, 2012, 09:10:35 pm
content: well i'm walloing my way through mikroC at the moment, it's working - mostly

author: Unknown
author_rank: Unknown
timestamp: October 14, 2012, 11:55:14 pm
content: Quote from: Simon on October 14, 2012, 09:10:35 pmcool