![]() |
Forum Index : Microcontroller and PC projects : Simplest and cheap USB PIC18
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
Bump! Anyone at all? Can program any PIC32 and only need 2 USBISP / USBASP boards at about $2 each plus a few resistors. John |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Sorry John - Christmas and Hogmanay and now catching up with all the stuff which I should have done over those few weeks. Peter The only Konstant is Change |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
i've been trying to get people to beta-test code, with absolutely zero success. much the same when asking for even the tiniest bit of assistance, and nothing but negativity when i put forward circuit design ideas on a number of forums. the most useful feedback i have received has been on the retrobsd forums, but even that has been patchy and at times a struggle. one fellow over there, "nroff-man", has achieved good results uploading micromite code using an arduino nano - with onboard USB using a CH340. these boards cost just a few dollars on ebay: http://www.ebay.com/itm/371215911158 his work is discussed here: http://retrobsd.org/viewtopic.php?f=6&t=37055&start=60 with a wiki here: http://wiki.kewl.org/dokuwiki/projects:nanu-nanu john: the Arduino nano may be easier to work with than the USBISP. the nano has a bootloader already present, so one can just use avrdude to upload code to it over the USB/serial connection. you can also directly substitute other arduino family devices, such as the original full-sized arduino boards, or an 8MHz pro mini running at 3v3 hooked up to a CP2102 bridge. cheers, rob :-) |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
Guys I think the issue is that you have a solution looking for a problem. Many of us have Pickit3 (or PicKit2 + pic32prog), or given one programmed micromite we can use MMprog32RPC. Newcomers will buy their micromite ready programmed and when they progress a PicKit3 clone is so cheap now it is not really worth looking for an alternative and the MPLAB IPE is now just as easy to use as the old interface to the PicKit 2 was. I'm fairly new to this forum but lots of people seem very willing to help in all sorts of ways, I certainly am when possible but there are only so many hours in a day. I probably have a couple of USBASP somewhere and I certainly admire the ingenuity of what you doing but, being brutally honest, I can't commit the time to help you on this one. Sorry ![]() Peter |
||||
Gordz Regular Member ![]() Joined: 10/08/2013 Location: AustraliaPosts: 55 |
Hi John. I would recommend the 16F1459 for sure. I have made up several little CDC emulator devices with this and there is a fair amount of other code out there which would probably fit the bill. I have found them reliable and cheap. |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
(my apologies for cutting the above quote to shreds, but i think the general ideas remain) i'm afraid i can't say i agree with any of the above four points. the pickit3 is rather pedantic for some number of users out there, while the MPLAB software confuses many and doesn't always function. i can't even use it on my netbook because vital controls overflow the bottom of the screen. a pickit3 clone can be had for around $30 when not discounted, but this is still many times the cost of a single PIC32MX. folks on this forum have asked about ways of reprogramming their ONE micromite, and displayed just a little disappointment when told the cost of the hardware needed and complexity of software. to a beginner, i personally would recommend a pickit2 (not a 3) and pic32prog as currently the least intimidating solution. there will always be folks out there with little discretionary cash, and a limited ability to cope with complex reprogramming solutions. these are the ones that peter, john, i and others are trying to help out by working towards the simplest and cheapest way to get a micromite up and running. btw, i do now own both a pickit2 and a pickit3, but still keep working on simpler/cheaper substitutes. rob :-) |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
I notice that Microchip have a deal going currently that gives a 50% discount to update anyone's PICkit 2 to a PICkit 3. It's available from MicroChip Direct or any of their usual "official" suppliers, Element 14 etc - but only for a short time. I'm not sure if they're trying to lock in people or whether they're being helpful, but if you have a PK2 and want to swap it for a PK3 then the 50% discount would take it pretty much below any of the clones. Greg |
||||
BobD![]() Guru ![]() Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Silicon Chip had that offer listed on page 57 of the January 2015 issue. It looks attractive at first but when you read the fine print it seems not so great. You have to mail the Pickit2 to either the European or US service centres. They then send you a 50% voucher. The discount is on the normal retail price. The mailing costs and time in transit in many cases may be quite significant. End date is 28 Feb. This deal is also for ICD2, Promate II, Pickit 3 rev2 and earlier, and ICD 3 rev 3 and earlier. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
BigMik found a PK3 clone on BangGood - http://www.banggood.com/Pickit3-Pickit-3-Pickit3_5-Kit3-Emul ator-Programmers-Programmer-p-88947.html - and for GBP 12.73 inc P&P, the price cannae be beat. I wrote MMProg32RPC not to save GBP 13, but to find out for myself what could be achieved with just a 4.5 uMite, (45 min programming time), and of course that experiment blossomed into CFunctions (73 sec programming time) etc. Although I have a PK2+Pic32Prog, I always use MMProg32RPC to programme my uMites - "Eat your own dog food" as my friends in the USA say. Peter The only Konstant is Change |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
Hmmm.. I didn't read that far Bob - you'd have to be pretty keen to do all that rather than just order a $25 clone online. I totally agree with that sentiment Peter, and John and Rob's techniques are in a similar vein and have achieved good results. I enjoyed following that whole thread but didn't try to test any of the methods because I didn't feel very competent about it and I already had a PICkit 3 I'd been using for a couple of years. I think Peter M's comments are valid for probably the large majority of users though. Greg |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
You make some good, though I think not any new, points - though there's an immediate counter-example here The original reasons included the intellectual challenge and a wish to have flexible open source code that would free us from reliance on such as Microchip MPLAB. MPLAB is all very well except it is huge, prone to not working, prone to not supporting every PIC32 except rather late and then needs another huge install, and of course it doesn't even run on lots of systems. It is also a very badly behaved install on Linux - very naughty and inexcusable. But I wouldn't want anyone to spare time they don't have, especially if they can afford a PICkit and don't mind the shortcomings. John |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
The snag is that the nano etc arrive unprogrammed so you need a programmer. The cheapest is a USBISP. The USBISP is also cheaper than a nano, so it made sense at about $2 each just to buy 2 USBISPs. They're very easy to work with, no problems at all. A 3V3 part would save a few resistors, though. Of course it's ridiculous to be able to buy a board with cable, 16MHz uC (flash, RAM & EEPROM) with circuitry for serial I/O & USB all for $2, s/h included free. Thanks for the pickle etc links - I'll take a look and it appears it may be something I wish I'd found before writing a ton of code! Thanks also for the retrobsd etc links. BTW my RPi programmer is my code, not pic32prog. John |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
as far as i'm aware, all arduinos ship with an arduino bootloader (usually optiboot) already present. the 'official' approach to development is to just use the arduino ide to develop code (in C) then upload it over the nano's usb port. the arduino ide uses avrdude for the uploading, which is what talks directly to the nano over an RS232-format link. no avrisp is needed; avrdude knows how to talk to a atmega328P containing a bootloader. so all you need is a .hex file containing your (compiled) arduino application, a copy of avrdude, and any single arduino PCB (which is shipped with boatloader already installed). one of the core ideas behind the arduino 'brand' has always been that the bootloader is loaded at the factory. the only hitch is when something goes wrong and the bootloader accidentally gets damaged. this used to happen quite a bit due to a (naive) design error in the arduino reset circuitry, but in the latest official arduino devices this has been fixed. the error was diagnosed by a brilliant (and handsome) electronics engineer, along with a single-diode fix that can be retrofitted easily. it took a great deal of lobbying to get the original designers to accept that the design error even existed, and even after (reluctantly) rolling out the fix across the product line they never admitted to anything in public or offer any thanks. cheers, rob :-) edit: got bootloader name wrong. should be optiboot, not omniboot. fixed in text ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
rob, You may well be right that they mostly have a bootloader but to program via serial means also buying a serial device so not much cheaper and for sure less certain than just getting 2 USBISPs. Would shave a few cents ( pence, here ) off, so the really poor should go that way LOL I'll maybe pick up the cheapest I can find that's under $4 and play... edit: on its way, $2.20 good grief - but needs some soldering Vital to avoid FT232 boards now as they're liable to be more than $2 and also have fake chips! John |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
the arduino nano has the USB to serial bridge onboard - the chinese ones use a CH340 which is a non-cloned device (being a chinese design). i have a couple of these chinese nanos here but not tried them yet, so can't comment on the quality of the windows drivers. you are certainly right about the FT232 devices. with the ftdi windows driver fiasco causing so much widespread damage to customer products, they have pretty much ruled themselves out of contention. they just pose too much risk to go near. for the moment, the safest choices for USB to serial bridge seem to be the CP2102 and CH340. does the fact that a micromite user needs to have a USB to serial bridge to talk to their micromite anyway not mitigate that requirement that one (which can be the same one) is needed to talk to an arduino? and if an arduino nano is held in reset, then by my reckoning the bridge part can still be used to talk to a micromite (the 328P's RxD and TxD pins being tristated when in reset). cheers, rob :-) |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
It says it's a nano but I see no USB. I hope I haven't bought a cheap board that isn't even what it claims to be! edit: I reckon I have hmm, looked at more boards all called nano and they vary. Weird. Rather pesky, too. Oh well, I have any number of USB to serial boards so I'm OK. The main thing seems to be that the boards which include it cost more - hardly a surprise. I've ordered one of those as well, though cost over $3. I'm disappointed that nano covers both kinds, but I suppose that's what can happen when being super-cheap. I still couldn't find a similar PIC let alone PIC32 board for that kind of money. John |
||||
vasi![]() Guru ![]() Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Regarding to the Arduino Nano (the reference design), there is an USB converter underneath. The Arduino Pro and Mini does not contain a converter - Arduino.cc recommends their USB to Serial adapter based on an ATmega with USB. Here, a PIC16F1454 would be great. Ignoring Chinese market, Mikroelektronika makes one of the cheapest arduino "nano" with USB adapter included (FTDI ![]() But of course, we can't ignore Chinese market ![]() It is a pity that no one here needs to break the ice for a better 8bit micro programmed with an easy to learn language... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
it is entirely confusing. in the 'official' lineup there are: - micro - mini - nano - pro mini - fio nano has onboard usb, fio has usb and li-ion battery charger. micro uses a 32u4 processor with usb built in. mini and pro mini seem functionally the same with just slightly different pin locations. no wonder the chinese are confused - they just shove every possible name into the auction title! the chinese closes seem to divide into two types: (1) similar to a nano with a CH340 or ftdi clone. CH340 is more recent (2) similar to a pro mini (no USB) available in 3v3/8MHz or 5v/16MHz versions cheers, rob :-) |
||||
vasi![]() Guru ![]() Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
The Micro is the breadboard-able variant of Leonardo, which has an ATmega with USB, no need of an adapter. The PRO line address the need of an Arduino without USB to PC connection, embedded to a final project - it is cheaper. The Arduino PRO has the form factor of the standard Arduino UNO, and PRO MINI is just a miniaturized version for embedding in miniaturized designs. Probably a Tree kind of presentation will help in making things more clearer. Even for Chinglish people ... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
Thanks. I found the official Nano design easily but have so far been unable to find a true schematic for the variant with CH340 chip. I can guess roughly what it is but that's silly, guesswork should not be involved! John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |