Looking for a way forward with Microcontrollers/Microprocessors - Page 1
Forum section: electronics / general

author: pmurray4
author_rank: Contributor
timestamp: January 19, 2015, 04:54:49 am
content: I've been programming PIC16/18 for quite a few years now (going on at least a decade using the CCS compiler) and finding that I would like to move onto something with a bit more power.I'm interested in eventually learning how to use Ethernet/USB and well running graphical displays.My first consideration is moving to PIC32 since I have the ICD3 programmer and I'm familiar with microchip, but I would like to know what else is available.I have a very small budget so I would like to get into an architecture that doesn't require a multi-hundred dollar development system purchase just to learn how to flash a LED.I considered ARM but I can't figure out a good place to start with that either.any suggestions?

author: mtdoc
author_rank: Super Contributor
timestamp: January 19, 2015, 05:47:48 am
content: Quote from: pmurray4 on January 19, 2015, 04:54:49 amStartHERE. It's free! (well, except for the $20 for the Tiva C board).

author: hamster_nz
author_rank: Super Contributor
timestamp: January 19, 2015, 07:47:29 am
content: Although I know a little about embedded systems I've signed up to see what the courses are like. It helps that I have a Launchpad sitting on the shelf, begging me to use it for something!

author: zapta
author_rank: Super Contributor
timestamp: January 19, 2015, 07:51:40 am
content: Quote from: pmurray4 on January 19, 2015, 04:54:49 amYes, the ARM PRO MINI. An excellent and inexpensive introduction to the ARM architecture, and if you will pass the challenge I may send you one for free ;-)

author: hamster_nz
author_rank: Super Contributor
timestamp: January 19, 2015, 08:19:06 am
content: If you want USB, HDMI for a display and networking, you might consider springing US$35 for a Odriod-c1, and running Linux on it.http://www.hardkernel.com/main/products/prdt_info.php?g_code=G1415786084331GB RAM, Quad core, Gigabit networking, RTC....Or follow the path of least resistance (and most documentation on the web) and get a Raspberry Pi, with it's single core, 100Mb/s Ethernet and no RTC.It might be a sledgehammer compared to a smaller controller, but it sounds like you've done your time on small, lightweight, power-sipping microcontrollers :-)

author: picandmix
author_rank: Frequent Contributor
timestamp: January 19, 2015, 10:10:08 am
content: Why not utilize what you have got ?A pic18F4550 is the cheapest way to get going with USB ; Microchip have a full program suite for free.Graphic displays, many use SPI communications so almost any Pic will run them, memory size allowing.Ethernet can be again added on to most Pics.If you want something ready made then microchip offer both a USB and a Ethernet Pic32 dev board for around GB £35 - £45 each.

author: nctnico
author_rank: Super Contributor
timestamp: January 19, 2015, 12:31:01 pm
content: Quote from: pmurray4 on January 19, 2015, 04:54:49 amLook at Zapta's small ARM board in this section of the forum (https://www.eevblog.com/forum/microcontrollers/introducing-the-arm-pro-mini-board-arm-made-eazy/) . It doesn't get any easier.

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 01:09:07 pm
content: QuoteYou may consider PIC24: they are much nicer to program, and offer good performance + code density. Mhz for Mhz, they are comparable to lower end ARM chips, yet allow you to retain the environment + programmer.Having said that, those ARM chips from ST are nice as well, but more difficult to learn for a newbie.I wouldn't invest anything in PIC32.

author: tszaboo
author_rank: Super Contributor
timestamp: January 19, 2015, 01:12:33 pm
content: Quote from: mojo-chan on January 19, 2015, 10:48:20 amMost newer ARM are made on a smaller node, and in fact are quite comparabe with microchip's and atmel's low power mode. Example:Microchip nanoWatt XLP 830nA Real Time Clock & Calendar operation in Sleep modesSTM32L100 Ultra-low-power mode + RTC: 900 nA with backup registersI think if you are familiar with Microchip, I would try the MX version of the PIC32 (NOT THE MZ). I had very good experience with them, setting up and using the development environment is easier. If you dont pay for ARM development, you have to work with frankeinstein IDEs, write make files, GCC, and all this bullshit which drives people away from ARM.I would skip the 16 bit MCUs. There isnt anything interesting there, most of them are replaceable by a 8 or a 32 bit MCU.

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 01:19:36 pm
content: QuoteSpecifically, I would suggest that you try the Nucleo or Discovery boards: they are sub $20, and all-in-one boards - with a hardware debugger / programmer embedded. The Nucleo boards have Arduino styled headers allowing them access to cheap accessories; Some Discovery boards have lcds or other peripherals onboard as well.I am a big fan of CoIDE for its simplicity. It has good support for the ST chips.Beyond that, you can buy a st-link programmer / debugger ($20 from ST or $5 from ebay) and 3 - 4 wires later, you have a board to go. Lots of cheap boards on ebay, or you can make your own - there is a long thread on making those boards with minimum components (the "ghetto" thread). With less than a $, you can get a STM32F030F running on a pcb adapter.If you ever want to make a living from this, go with ARM.

author: zapta
author_rank: Super Contributor
timestamp: January 19, 2015, 04:01:44 pm
content: Quote from: pmurray4 on January 19, 2015, 04:54:49 amPmurray4, I was in exactly same situation a few months ago. I used AVR 328p with Arduino IDE for a few custom PCB projects but wanted switch to ARM. The numbers of vendors and options was overwhelming and many of the sample boards that vendors were too complex and not a good starting point for my own custom designs. Initially I got a ST board (digikey 497-14098-ND) but then realized that the software aspects (toolchain, IDE, libraries, etc) should be an important aspect of selecting a vendor. After additional research and experimentation I settled on NXP. They provide an excellent IDE (LPCXpresso/Eclipse) that is easy to install (no 'tool chain' headache), run on all major OSs and is free for the MCUs I plan to use. Then I picked an MCU (LPC11U35, M0, USB, 48Mhz, 64K, down to 5x5mm package) that comes with build in serial and USB/HD bootloaders (the USB/HD bootloader allows to update the firmware with a standard file drag and drop, no special software needed, excellent for field upgrade). And then it can be also used also with an optional $20 debugger and is compatible with mbed which is an Arduino like (though not as popular) ARM eco system and a free online IDE.I recognized that different people have different needs and preferences so the above is not 'the only truth' but a description of my way into the ARM architecture which resulted in the ARM PRO MINI boardhttps://github.com/zapta/arm/tree/master/pro-mini#arm-pro-mini.The diversity of the ARM market is one of the main obstacle for new comers.

author: Howardlong
author_rank: Super Contributor
timestamp: January 19, 2015, 06:30:25 pm
content: Quote from: mojo-chan on January 19, 2015, 10:48:20 amGenerally agreed. If you want to stay with Microchip, for Ethernet you'll need to go PIC32 if you want it integrated. There are options for smaller PICs if you're OK with reduced throughput using their ENC28J60/ENC624J600 devices which have integrated PHY. With most devices including all PICs with integrated Ethernet be aware you will need to add an additional PHY chip. Some TI TM4C ARM devices have integrated PHY, there may be others.Regarding power consumption, it largely depends what core you're talking about, and how careful you are with clocking not just the core but also all the peripherals. In my experience between PIC32 and ARM M4 at the same clock speeds, the PIC32 has better consumption, however ARM devices tend to have more clocking domains and options (which can also seriously further complicate things!).Be aware that Microchip are pushing very hard for folk to use their new Harmony framework with PIC32, making the old MAL libraries "legacy". While the MAL is/was rather a hotch potch of APIs, it did work, whereas Harmony, despite being out for over a year, is a real mess in terms both of being buggy, and lacking decent training and documentation. It also does not perform anywhere near as well as the old MAL in many situations mostly due to the unnecessary levels of abstraction. The PDF for Harmony is currently a 5,300 page semi-computer generated PDF.I would also steer well clear of the PIC32MZ for now which not only forces you into the Harmony framework, but is heavily bug-ridden silicon at the current time with some serious shortcomings in the errata, and even a year later they're finding more and more quite fundamental stuff wrong with them. I can't imagine they characterised much of that chip before releasing it. Stick with the PIC32MX and MAL for now if you go the Microchip 32 bit way.IMHO, the big plus point about Microchip is the peripherals and their relative simplicity and consistency across all devices. While they're certainly not identical across the board, there's sufficient similarity that going from one device to another doesn't give you too many surprises.One of the worst things about ARM is knowing where to start when it comes to picking a device from the gazillions of options. What doesn't help is that not only do ARM have a non-obvious naming convention for their cores which their marketing has seen fit to change confusing things further, but the various licensees don't always make it easy to differentiate either.Having said that, I'd agree regarding the Tiva C launchpads, they're a reasonable enough way to get started. Their EK-TM4C1294XL includes both Ethernet and USB, and has a debugger onboard, all for $20. They also support a system of add on boards like Arduino shields called Booster Packs. TI generally has the best documentation both in terms of written and video: however there's just so much of it, so knowing where to start makes it very intimidating.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: January 19, 2015, 06:44:48 pm
content: I'd second pic32mx + plib! the stm f4 discovery board is nice for arm, but if you have the icd3/pickit3 already, and are familiar with mplabx, pic32mx is real nice. plib will be familiar as well.

author: zapta
author_rank: Super Contributor
timestamp: January 19, 2015, 09:17:24 pm
content: Quote from: BloodyCactus on January 19, 2015, 06:44:48 pmUnless if the OP's goal is to learn something new ;-)

author: ralphd
author_rank: Frequent Contributor
timestamp: January 19, 2015, 10:14:43 pm
content: I think it's hard to beat the Cypres 4200 development board at only $4.http://www.cypress.com/?rID=92146I think the shipping might even be free now.

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 10:33:49 pm
content: QuoteThe good thing about those TI chips is that they are incredibly feature rich: lots of peripherals. I would also mention the rom library to be a life saver (more like a flash saver).A few things to know, however.- they are fairly buggy, particularly on the adc - those chips had their origin in Luminary. Read the errata first before you decide to use them.- TI has yet to lay out a roadmap for those chips and they haven't shown they intend to play in this market long-term.- The IDE (eclipse) is quite bloated.I would say that if you are comfortable with your debugging skills, or have a good working relationship with TI, they are a great chip.

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 10:34:46 pm
content: QuoteDepending on how your perceive value.To me, low price alone isn't a reason enough to use a chip.

author: Howardlong
author_rank: Super Contributor
timestamp: January 19, 2015, 10:51:00 pm
content: Quote from: dannyf on January 19, 2015, 10:33:49 pmIf you think TI's TM4Cs are buggy, try the PiC32MZ! I can't ever remember any silicon being as bad as that. A major selling point was its integrated 12 bit 28Msps ADC with 6 sample and holds. Gradually, it's been downgraded in successive errata since its release a year ago, first to 16 Msps, 1 S&H, 10 bit, and now 1Msps 1 S&H 8 bit. So worse than some of their existing devices.Yes the TI IDE is bloated, but it's less buggy and more responsive than NXP's LPCxpresso, also an Eclipse IDE. Should I mention that it took nearly three years for Microchip to make their MPLAB X IDE what I would finally consider production strength? I still prefer their old MPLAB IDE, and I'm not alone, even within Microchip their consultants prefer it, but you're forced into using the new IDE as there's no support for the newer chips in the old IDE unless you hack the support yourself.

author: pmurray4
author_rank: Contributor
timestamp: January 19, 2015, 11:52:37 pm
content: Thanks all who have replied, sorry for the delay in responding.mtdoc: I will have a look at that edx course this week, thanks for mentioning itI currently use the CCS compiler for the PIC18 family, so for me to switch to the 16/32 bit PIC I would have to learn to use the Microchip C compiler (or pay for an upgrade for CCS which I'm not going to do). I have been doing a lot with CANBus over the years (one example is shown in one of my videos) and feel that the PIC18's are not up to the task of handling all the data I'm potentially throwing at them.I've got comfortable with the PIC18's but I'm finding that they are becoming less used in the industry and I also have been learning how to use an Altera cyclone II devboard and a Xilinx spartan 3 devboard, support for both chips have been dropped by the IDE's from each company not too long ago. This is telling me it is time to move on to something that will be still supported when I have a grasp of using it. I'm pretty much trying to future-proof myself and avoid the same reaction that I got when I went for a job 10 years ago and told them I did Z80 and 6502 assembly.I found most of the replies are aimed at ARM variants, so this seems to be a good direction to go. so I will put my efforts into this for now.zapta: I had a look at your ARM pro mini page, looks really good, how much do you sell those for? and would the stuff I could learn to use this board be applied to other ARM boards as well or is it specific to this devboard?Many thanks

author: westfw
author_rank: Super Contributor
timestamp: January 20, 2015, 12:42:24 am
content: the TI Launchpad is also supported by Energia, an Ardunio-like ("painfully simplified") development environment.The UTX EdX class is a pretty good intro to the TI ARM chips; although if you have previous embedded C experience, some of the other material, or reading the discussion forums. might be a frustrating eye-opener.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 20, 2015, 01:09:26 am
content: Quote from: dannyf on January 19, 2015, 01:09:07 pmWhy not? The chips are certainly capable, there's a good free* development environment, and, given Microchip's track record, are likely to be around for a long long time.ARM is certainly more ubiquitous, and offered by multiple vendors, but I don't see any significant advantages the architecture has over the PIC32.*-the free compiler doesn't support optimization, but I haven't found that to be a serious constraint.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 01:20:29 am
content: I still have a PIC32MX chip laying around somewhere that I sampled when I was still at college but I didn't have time to play with it much. I couldn't get to grips with MPLABX, they changed it so much in comparison to MPLAB 8, and I could never get the sample code to compile correctly.westfw: My previous embedded C experience is with CCS which I find to be not quite the same as other C's (Namely Microchip C, Rabbit C) so I'll be basically taking the plunge and learning almost from scratch, as you say, this will definitely be a frustrating eye-opener. but I think it's the only way I can get myself up to industrial standards.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: January 20, 2015, 02:58:00 am
content: Quote from: pmurray4 on January 20, 2015, 01:20:29 ammplabx is just netbeans, quite simple to use. and pic32 c compiler is just gcc, which is good, not at all like the xc8/xc16 garbage. last time I used one of those it complained of too many case statements in a switch. pic32 is nice, a well understood mips core with a well understood mips compiler!

author: zapta
author_rank: Super Contributor
timestamp: January 20, 2015, 04:17:11 am
content: Quote from: pmurray4 on January 19, 2015, 11:52:37 pmHi pmurray4, I don't plan to sell them but still have a budget for a few free samples (including shipping). If interested, install the IDE, modify the hello_world.cpp program to print your name and mailing address, build the .bin file and email me. The ARM PRO MINI page should have all the documentation and if you need help let me know in the ARM PRO MINI thread or a PM.For your second question, my understanding is that ARM product from different vendors differ in the I/O but the general architecture and possibly also basic I/O such as GPIO are similar. I don't really know, others can add more information.I switched to it from Arduino/AVR (atmega328p) and find it to be simpler and more intuitive. For example, the large memory space allows have the flash mapped in the same memory space (useful for string literals and consts) and the GPIO is organized as a consistent array of ports and bits that can be accessed using standard pointer referencing. It works great for me.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 04:41:00 am
content: Hi Zapta, I did the modifying of the hello_world program as you said, was quite easy. The hardest part was finding the platform from the list

author: zapta
author_rank: Super Contributor
timestamp: January 20, 2015, 05:00:30 am
content: Quote from: pmurray4 on January 20, 2015, 04:41:00 amHi pmurray4, what platform and what list? The Getting Started instructions here should install and configure anything you need to build the hello_world.bin (once you build you will find it in the Debug sub directory).https://github.com/zapta/arm/tree/master/pro-mini#quick-start-3---installing-the-lpcxpresso-ide-and-compiling-hello-worldThe hello_world.cpp example is for lpcxpresso. The .bin file I got seems to be from mbed.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 05:11:33 am
content: it appears I skipped a step and followed the instructions for creating a binary from the online IDE. I've re-read and have just installed and registered/activated Xpresso

author: zapta
author_rank: Super Contributor
timestamp: January 20, 2015, 07:05:05 am
content: Quote from: pmurray4 on January 20, 2015, 05:11:33 amMy bad, I should have given you this direct linkhttps://github.com/zapta/arm/tree/master/pro-mini#quick-start-3---installing-the-lpcxpresso-ide-and-compiling-hello-world

author: poorchava
author_rank: Super Contributor
timestamp: January 20, 2015, 07:44:23 am
content: STM32 + STlink V2 Clone (or one included on Discovery and Nucleo series of boards) + CooCox CoIDE is I think the closest you will get for free, that resembles a commercial toolchain.It's generally the same thing as "frankenstein" toolchains (editor, gcc, gdb, openocd, zlin CDT and so on), but all the stuff is already done and configured (CoIDE is a proprietary modified compilation of Eclipse), you only need to install the GCC and provide path to it in the IDE. It has some code generation tools, libraries and so on.

author: westfw
author_rank: Super Contributor
timestamp: January 20, 2015, 09:36:50 am
content: QuoteNot compared to the other people in the EdX class! The class will include people who've taken an introductory CS class that programs in Javascript, and don't quite understand things like "bits." Reading and Helping out on the forums is a education in itself (a worthwhile one, I think.) MOOCs are weird; they have a MUCH wider range of "previous knowledge" than real classes.

author: 22swg
author_rank: Frequent Contributor
timestamp: January 20, 2015, 10:47:06 am
content: My ' Way forward ' was PIC24 . I found 16's a good introduction to the mcu world eventually I was seduced by PIC32 in the form of CHIPkit UNO ..Now whizzing along with 24 my latest diy lashup PIC24EP512GU810

author: dannyf
author_rank: Super Contributor
timestamp: January 20, 2015, 11:22:11 am
content: Very ghetto-ish - liked that. I have a few PIC24F on pcb adapter boards too.Really nice chips. Way under-marketed by Microchip.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 12:36:34 pm
content: I never got past the obligatory flashing led demo on the pic24's. Having used CCS I got too comfortable with I/O being done for you by the compiler. Things such as UART setup is done with a single preprocessor command at the beginning of your code. I've never been able to get much from the UART in Microchip C without a lot of messing around.

author: Howardlong
author_rank: Super Contributor
timestamp: January 20, 2015, 01:10:56 pm
content: FWIW I had a brief dalliance with CCS about six years ago having been staunchly Microchip C16. However they had a great board at the time, DSP Analog, with a top of the line dsPICs, before the PIC32 was released. While I found the CCS environment OK in itself, I found it altogether too different from the "standard" C and despite building some hardware around their demo board and writing some stuff for it, I went back Microchip's compiler and IDE.As you say, the programmer can forget about a lot of the intricacies of the devices as it's taken care of for you to a large extent in CCS. However it wasn't long before I found myself constrained by it too.The thing I despised most about the CCS IDE was the bloody ribbon menu (a la Office) taking up enormous amounts of screen real estate. Another irritating modern day "feature" we have Steven Sinofsky to thank for. I wonder if he did Clippy too?

author: 22swg
author_rank: Frequent Contributor
timestamp: January 20, 2015, 01:37:40 pm
content: pmurray4.. Strange I found PIC24 EUART the easiest peripheral to run in C , TX .. check MT flag and write to TXREG . RX.. interrupt writes to circular FIFO and sets flag. Now I2C was a challenge...

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 01:41:09 pm
content: I wasn't a fan of the ribbon stuff either. When I started using CCS (at a company I worked for) its IDE was used because the MPLAB IDE at the time would crash a lot (ver 5 or 6, it was in 2006 anyway). I learned C on the job using CCS. I wanted to learn PIC assembly but I had no resources available at the time so I used what I had access to.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 01:44:16 pm
content: 22swg: I did all the writing to registers OK, it was the configuration of the clocks and baud that I had the most trouble, whenever I wrote to the UART, I would get gibberish out.

author: Howardlong
author_rank: Super Contributor
timestamp: January 20, 2015, 01:53:33 pm
content: Quote from: pmurray4 on January 20, 2015, 01:41:09 pmEven MPLAB 8.92, the last release, has, shall we say, "character". MPLAB X is now largely bug free and production strength, but is still nowhere near as fast as MPLAB IDE for the edit-compile-debug cycle. So my default is still the old MPLAB IDE, unless the device isn't supported, when I have to go to MPLAB X.

author: mtdoc
author_rank: Super Contributor
timestamp: January 20, 2015, 05:11:30 pm
content: Quote from: westfw on January 20, 2015, 09:36:50 amMan, you've got that right. Having relatively little programming experience (LabView doesn't count), I thought I'd be at the bottom of the "previous knowledge" chain - but not even close. Then there were many in the UT embedded class like you with extensive previous background. Amazingly, all seem to have benefited.I'm still trying to decide which IDE to devote my energy to. The edX embedded class uses the free version of Kiel which I found very nice to use. I'm not sure if or when the limitations of the free version will impact my modest hobby projects. I can't ever see myself being able to justify a full license purchase. I've started to play around with the free CCS which doesn't have those limitations but I do not hear a lot of CCS love coming those with more experience.

author: zapta
author_rank: Super Contributor
timestamp: January 20, 2015, 05:38:29 pm
content: Quote from: mtdoc on January 20, 2015, 05:11:30 pmEclipse is the most versatile IDE IMO. I used it for programming microcontrollers (C/C++), mobile devices (Android, Java) and cloud servers (C++, Java). It also has plugins for many other languages and tools.

author: mtdoc
author_rank: Super Contributor
timestamp: January 20, 2015, 05:47:09 pm
content: Quote from: zapta on January 20, 2015, 05:38:29 pmCCS is Eclipse based, isn't it?

author: zapta
author_rank: Super Contributor
timestamp: January 20, 2015, 05:53:26 pm
content: Quote from: mtdoc on January 20, 2015, 05:47:09 pmYes, you are right. This will give you then general Eclipse experience that will be very useful with other Eclipse based products. It may feel sometimes a little too generic for the specific application since it was designed as a flexible IDE framework but once you get the hang it will be useful for other projects.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 05:54:46 pm
content: I don't know about the latest releases but none of the versions I've used were.

author: mtdoc
author_rank: Super Contributor
timestamp: January 20, 2015, 06:12:24 pm
content: Quote from: zapta on January 20, 2015, 05:53:26 pmThanks. Yes, reading more about it, it looks like CCS has been Eclipse based since version 4. It's just an embedded specific overlay. Apparently you can even install it as a plug in to an existing Eclipse installation.I'll have to spend some more time with it. I do wish it had the (emulated) logic analyzer that Keil has. I find that to be a very usefull debug tool.

author: pmurray4
author_rank: Contributor
timestamp: January 20, 2015, 06:50:05 pm
content: I must have stopped using the CCS IDE before it switched to Eclipse, the last versions I used were in the 4 range I think.I switched fully to use MPLAB as the IDE when I switched to the ICD2 (and then ICD3).The company I worked for originally had the PICStart Plus, we had to compile in CCS then use MPLAB to flash the hex. was a nightmare until I introduced them to ICSP

author: dannyf
author_rank: Super Contributor
timestamp: January 20, 2015, 06:51:10 pm
content: QuoteThere are three different CCSs, two mentioned inter-changeably in this thread.They are night-and-day different from each other and are completely unrelated.

author: Howardlong
author_rank: Super Contributor
timestamp: January 20, 2015, 09:16:57 pm
content: Quote from: dannyf on January 20, 2015, 06:51:10 pmIndeed.The CCS I was referring to was in respect of a proprietary development environment solely for Microchip PICs.http://www.ccsinfo.com/CCS in the TI world is Code Composer Studio, an IDE for TI's offerings, both ARM and non-ARM, currently Eclipse based, but was their own IDE not too long ago.Don't know about a third option.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 20, 2015, 11:13:19 pm
content: Quote from: zapta on January 20, 2015, 04:17:11 amThe ARM Cortex core itself provides the NVIC (nested vectored interrupt controller), SysTick (a timer typically used to generate RTOS timer ticks), and very little else. All of the other peripherals, including GPIO, are vendor-specific and vary widely in capabilities and complexity.Porting from one vendor's ARM Cortex to another's requires a complete rewrite of the peripheral drivers.

author: pmurray4
author_rank: Contributor
timestamp: January 21, 2015, 02:49:19 am
content: the NVIC and SysTick sound very useful.So I should get used to the coding of the arm then choose a vendor when I'm comfortable and base my designs on that vendor. but I still have the option of moving to a different vendor with only having to rewrite the peripheral drivers?doesn't sound too bad.I'm looking forward to what the EdX course teaches me, it starts tomorrow

author: Howardlong
author_rank: Super Contributor
timestamp: January 21, 2015, 05:08:06 am
content: Quote from: pmurray4 on January 21, 2015, 02:49:19 amI would pick a platform first, one that has the USB (the right speed) and Ethernet that you want, mindful that it might not be your final one, and run with it.Exactly as Sal Ammoniac suggests, each vendors' peripheral libraries are different, and there will be fundamentals in the different hardware implementations that means providing your own generic layer except at a very basic level will be difficult. You can only design a more comprehensive generic layer if you know what all the possible hardware options are that you're going to support, and I'd say you'll be facing a losing battle with that one. Just accept that there will be fundamental differences, sometimes even as simple as how to perform atomic GPIO port bit operations.

author: mtdoc
author_rank: Super Contributor
timestamp: January 21, 2015, 05:47:13 am
content: Quote from: pmurray4 on January 21, 2015, 02:49:19 amThe first few lessons will be pretty rudimentary if you have previous programming experience but it picks up the pace and gets into ARM specifics pretty quickly as I recall. I think this time round they are releasing lessons in larger blocks so you should be able to jump ahead to where it suits your level. If you want a grade you'll have to go through each lesson and run each of your programs through the nifty grader they have built into Keil.I'm looking forward to jumping back in where I left off last year.

author: pmurray4
author_rank: Contributor
timestamp: January 21, 2015, 05:54:42 am
content: is it live lectures or do I get to watch them and work through them when it's suitable for me? I've never done one of these courses before.

author: mtdoc
author_rank: Super Contributor
timestamp: January 21, 2015, 05:57:16 am
content: Lectures are released as videos (youtube I believe) that you can watch at your convenience.

author: miguelvp
author_rank: Super Contributor
timestamp: January 21, 2015, 07:50:21 pm
content: About the edx course. I did register for this as wellFYI for anybody registered, the Launchpad they recommend for this course is the EK-LM4F120XL (Stellaris) or the EK-TM4C123GXL (Tiva) not the original Launchpad which is not ARM based.If you don't want to buy the kit you can still use Keil uVision and complete the course via simulations as they state in their FAQ.But if you plan to do the labs and don't have the kit yet, you can still use the simulation and they think that as long as you get your kit by March 1st you'll be fine.I ordered the material from digikey because element 14 didn't show the Tiva Launchpad in stock, but you can always get the dev board from TI.I'm linking the FAQ:http://users.ece.utexas.edu/~valvano/edX/faq.htmlThere is a textbook available via amazon but it's not required.Also there is an optional purchase of an LCD display (Nokia 5110) which will set you $10 back on top of the kit.

author: zapta
author_rank: Super Contributor
timestamp: January 21, 2015, 08:18:06 pm
content: This course deserves a thread of its own if we don't have one already.

author: ElektroQuark
author_rank: Unknown
timestamp: January 21, 2015, 08:26:43 pm
content: I'm in too.It's highly recommended so I will try to find the necesary time.

author: miguelvp
author_rank: Super Contributor
timestamp: January 22, 2015, 04:23:11 am
content: Quote from: miguelvp on January 21, 2015, 07:50:21 pmAfter looking at their introduction videos seems like that FAQ applied to the previous offer of the class, because you can't get a certificate (if that matters to you, and I think it costs $50 to upgrade to the certified class) if you don't do the actual hardware labs.

author: jerry507
author_rank: Regular Contributor
timestamp: January 22, 2015, 04:44:59 am
content: I steer clear of any vendor that supplies an Eclipse based IDE. I think they all stink because of an over complicated and unintuitive user interface from Eclipse. The PIC24 is actually a pretty decent micro as others have said and MplabX is certainly better than Eclipse based offerings.NXP offers the LPCxpresso (http://www.lpcware.com/lpcxpresso) and it's pretty acceptable. Plenty of cheap dev boards around and the LPCopen libraries are quality. Full disclosure though, I use NXP professionally so I may be biased towards them out of familiarity.

author: pmurray4
author_rank: Contributor
timestamp: January 22, 2015, 05:44:38 am
content: I started the edX course, kinda got carried away and did 2 weeks worth of activity in the past 6 hours, completed 4 out of the 7 available chapters already. The simulation seems to work quite well toojerry507: I felt uncomfortable using Eclipse when I was trying to learn Java and would assume the uneasy feeling will be the same on any development tool based on it (or is it just Java that does that). I had a play with LPCxpresso the other night to complete zapta's challenge (though I think I had trouble finding the correct output directories) it did seem quite well done overall. The code space limit thingy irks me somewhat, I'm probably just uncomfortable with pay-based software restrictionsUntil I actually start doing real coding I won't know for certain if it would be a real problem.

author: zapta
author_rank: Super Contributor
timestamp: January 22, 2015, 06:09:29 am
content: Quote from: pmurray4 on January 22, 2015, 05:44:38 amThe output files are placed under build configuration directories such as Debug or Release. I am using Debug only for everything. You can delete the entire Debug directory and it will be recreated on next build. I also set git to ignore the Debug directory so it is not persisted in the the git repository. The ARM PRO MINI documentation contains an explanation on how to set Eclipse to build and download the .bin file with one click.I switched to eclipse from Intellij and Slick Edit a few years ago. Over the years I sampled Eclipse once in a while and switched to Eclipse when it was good enough. Now it's is my favorite IDE and is also by far the most popular IDE at the office.

author: miguelvp
author_rank: Super Contributor
timestamp: January 22, 2015, 09:12:37 am
content: Quote from: pmurray4 on January 22, 2015, 05:44:38 amI stopped at Lab 2 because I don't have the kit yet and it's due to be here tomorrow, I have an older MSP430 Launchpad and other Arm dev kits but I rather wait.I could have skipped most of the course so far but I went through it all including reading the datasheet of the TM4C123GH6, and the optional assembly section.So far 4 hours spent, as for my feedback on the course, it does cover the right bases, as in numbering systems that even if they are 2nd nature to me I can see why it would be important to someone starting up, so they are not rushing things at all, and they are covering the bases right. They even talk about MCU architectures, there are a couple of slip offs but nothing serious so far.Also there were some quiz questions not covered in the video and interactive coursware, as in what power is and other minor things that are kind of common sense (to me at least), so maybe reading the extra material (which I didn't other than the datasheet) might help others.BTW the TM4C123GH6 is a Cortex-M4 and pretty loaded! So far I'm liking this course.Also, I wouldn't rush through it too quick, C2 including Lab 2 is suggested to be done by the 30th (8 days away), C4 where you are at is suggested to be done by Feb 6th.Nothing wrong getting ahead, but if you reach C7 in one more day, you will have to wait until February 1st for the next batch, and C15 wont be ready until March 1st, so leaving you big gaps that might affect your midterm and finals (edit: which this course might not have so never mind).

author: westfw
author_rank: Super Contributor
timestamp: January 22, 2015, 09:21:01 am
content: TI's "Code Composer Studio" is Eclipse-based, isn't it? I tried it a couple of times back the last time the EdX class was offered, and was moderately impressed with the way TI had simplified the basic view, compared to ADT (also Eclipse), Atmel Studio (VS), or Keil.I don't know whether it's good or bad that Eclipse seems to be so wildly configurable :-( (LPCXpresso (formerly "Code Red") is also built on top of Eclipse.)(It's an interesting state of affairs when the most successful IDEs seem to be the ones that have done more SIMPLIFICATION rather than adding features...)TI CCS is one of the more reasonably priced "supported" IDEs (though presumably, only for TI chips. It's ... particularly annoying to contemplate a single-vendor IDE (and libraries) if you've picked ARM partially because of the many vendors. My command-line tool knowledge remains useful!)

author: westfw
author_rank: Super Contributor
timestamp: January 22, 2015, 09:25:57 am
content: QuoteIt's worthwhile (IMO) to stay "in sync" with the class enough that reading the forums make sense.And it is useful/educational to read the forums.

author: miguelvp
author_rank: Super Contributor
timestamp: January 22, 2015, 09:30:27 am
content: FWIW this course is based on uVision Keil and on their videos they did show the limited 32 KB version, which I think it also has debugging limitations as in you can't check the MCUs registers, flags or debug in assembly, not sure if that carries to C debugging yet.

author: westfw
author_rank: Super Contributor
timestamp: January 22, 2015, 10:08:14 am
content: When I took the class last time, I was able to use debugging at both C and single instruction levels.I don't recall whether there was register-level debugging; I don't think I had cause to use it.The class uses both the simulator and live hardware, and has a some "special" version of Keil (I'm not sure how it compares)There are ADDITIONAL debugging (and "grading") add-ons...

author: Howardlong
author_rank: Super Contributor
timestamp: January 22, 2015, 04:13:10 pm
content: Quote from: westfw on January 22, 2015, 09:21:01 amThe TI CCS toolchain doesn't cost a penny if you use the integrated debuggers on their dev boards or one of the XDS100 external debugger versions.

author: dannyf
author_rank: Super Contributor
timestamp: January 22, 2015, 04:20:09 pm
content: QuoteOpen up the disassembly window and step through instructions in it.

author: Howardlong
author_rank: Super Contributor
timestamp: January 22, 2015, 11:42:05 pm
content: Possibly the worst thing about Eclipse is the menu system, finding what you want is sometimes a chore. For example I always seem to have a short delay interrupting my workflow searching for the Watch window. I feel there are far too many menus items and often meaningless icons in your face making navigation a chore.I am sure I will be told there's a way to customise it, thing is I'd rather not spend hours putting lipstick on an elephant.LPCxpresso, another Eclipse IDE, has all sorts of nuances, for example you shouldn't use Eclipse's debug menu item and icon, you should use NXP's. Occasionally LPcxpresso's icons go missing only to reappear for no apparent reason. When you're switching between TI's CCS (also Eclipse) and LPCxpresso it's a chore. More generally, I'd say that TI's CCS edit-compile-debug cycle feels far more natural than NXP's LPCxpresso. The downside of TI's CCS is the way libraries and project items are copied or linked, that in itself is no at all self-explanatory due to the complexity of the environment. My preference os TI's CCS, but most of my work is on LPCxpresso, on LPC43xx, I've learned to just work around the LPCxpresso irritations. Just my opinion, of course!

author: pmurray4
author_rank: Contributor
timestamp: January 24, 2015, 10:25:41 am
content: I just read through the specs for the LPC11U35FHI33 because I was worried about what kind of programmer it needs and realized that it has a built in bootloader that pretends to be a USB drive, that's amazing! and very convenientno wonder you went with those chips zapta. is this common or NXP specific?I do have another question somewhat related to my original question for this thread. What programming language/suite is suggested for writing front-end software on Windows? Now I'm on my way with ARM, I need a way to interface with it on my computer. I currently use Delphi 7 though I struggle to attain efficient/reliable UART communications. I considered learning Java mainly for the multi-platform ability but I hear it's a huge pain to do any interfacing with microcontrollers due to each platform having it's own requirements.

author: AndreasF
author_rank: Frequent Contributor
timestamp: January 24, 2015, 12:27:30 pm
content: Quote from: pmurray4 on January 24, 2015, 10:25:41 amOn Windows, I would consider C# with Visual Studio Express, though admittedly the last time I used it to get serial data into a UI was a long time with an actual "COM" serial port, not a USB virtual port. No idea if that makes a difference.

author: ehughes
author_rank: Frequent Contributor
timestamp: January 24, 2015, 02:08:58 pm
content: QuoteNot all of the controllers do it.The LPC134x has a MSC bootloader as well as the 154x series.Most of the other ones have at a minimum a UART bootloader. Many also have a USB DFU boot loader. The high end LPC43xx have a couple other options.I *Really* like NXP as they seem to get it right and embedded boot loaders into all their chips. It makes production and field support mucfh easier. I refuse to use any chip that doesn't have a ROM bootloader. In this day and age, it is simply a must.I highly recommend you spend $20-$30 and get an LPCxpresso board. It has the JTAG/SWD dubgger built in and you will be able breakpoint, inspect variables, etcThe Arduino "load and see what happens" is so primitive. Use the debugger... It makes your life easier.

author: zapta
author_rank: Super Contributor
timestamp: January 24, 2015, 04:02:46 pm
content: Quote from: pmurray4 on January 24, 2015, 10:25:41 amYes, the file drag and drop USB/ISP was one of the attractions of LPC11U35. It simplifies in-field firmware upgrade by end users (works on all three OSs without having to install software). It also has serial bootloader (selected by the PIO0_3 input) but I never used it. Another advantage of the USB bootloader is that you can use parts of the USB stack there to reduce the code size of your program. This is what the ARM PRO MINI serial_usb library does.The arm_pro_min_lib project comes with a shell script that can be installed as a lpcxpresso external tool. When you click on it's icon it builds the project and copy the .bin to the board. This is how I do my write/download/run cycles.https://github.com/zapta/arm/blob/master/pro-mini/lpcxpresso/arm_pro_mini_lib/tools/copy_bin_to_usb_isp.shI also have a LINK hardware debugger (http://www.digikey.com/short/7zbr3m). It is supported by lpcxpresso and the ARM PRO MINI does have a SWD header but it's not as useful as I thought. 99% of the time I just debug without a debugger. It's simpler this way. I found that a LED, printf statements and an oscilloscope are more useful for debugging.The mbed environment is also intriguing. I wrote a small blinky for the ARM PRO MINI but would like to explore more its libraries and third party projects.

author: dannyf
author_rank: Super Contributor
timestamp: January 24, 2015, 04:24:40 pm
content: QuoteQuoteThey are not terribly consistent.

author: pmurray4
author_rank: Contributor
timestamp: January 24, 2015, 05:54:13 pm
content: Andreasf: I've not used a real com port in well over 6 years, I use FTDI mainly these days. I tried the FTDI DLL method in Delphi but I feel I'm going about parsing the input in a wrong way. I will look into C#, I used it at college, but they only had us doing simple stuff like adding numbers on screen.Concerning debugging, I mainly used LED and printf outputs in some of my previous systems. I used the CCS compiler within MPLAB and I could never get the debugging to work the traditional way with it.

author: zapta
author_rank: Super Contributor
timestamp: January 24, 2015, 06:05:30 pm
content: Quote from: pmurray4 on January 24, 2015, 10:25:41 amJava is an excellent choice in general, it can be developed an run on all three OSs. However, before you start check the serial port support in Java. I looked at it several years ago but could not find a portable solution, things may changed though. Those virtual serial ports should look like any other serial port so I don't think you need anything special.If Windows along is good with you than one of Microsoft supported languages may be a good choice but Windows only apps have lower value IMO.Other people reported good cross platform results with QT. You may want to search here.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 24, 2015, 06:11:30 pm
content: Quote from: pmurray4 on January 24, 2015, 05:54:13 pmI moved from Delphi to C#, and although there is a bit of a learning curver, C# is a lot like a better Delphi. I am sure part of the reason for that is that Anders Hejlsberg was chief architect of Delphi who went on to be lead architect of C#. The Visual Studio Express editions are nice to use and free, there is now a free Visual Studio edition as well.Certainly for building a basic GUI and talking to serial ports it is fairly easy.

author: pmurray4
author_rank: Contributor
timestamp: January 24, 2015, 08:46:47 pm
content: Is there a cross platform way to easily communicate between a computer and a MCU with java or qt? Since com port is dicey across platforms is there a way of direct USB per chance?

author: nctnico
author_rank: Super Contributor
timestamp: January 24, 2015, 09:24:34 pm
content: I'm using wxCtb for dealing with serial ports on Linux and Windows (http://wxcode.sourceforge.net/showcomp.php?name=wxCtb). It is supposed to be a WxWidgets 'component' but that just ends with the naming convention. It can be used completely standalone without any of the WxWidgets includes.

author: zapta
author_rank: Super Contributor
timestamp: January 25, 2015, 12:05:13 am
content: I used pyserial on Mac OSX but without GUI.

author: enz
author_rank: Regular Contributor
timestamp: January 25, 2015, 10:04:05 am
content: Qt comes with QSerialPort. I used it on Windows and Linux and it worked out of the box with both OS.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 25, 2015, 11:23:41 am
content: I haven't done much Java, but I have used JSSC which worked quite wellhttps://github.com/scream3r/java-simple-serial-connector.As for a direct USB interface, it's a great idea but I don't think any OS supports that directly. The idea of USB is that it is device oriented, i.e. mouse, keyboard, modem, disk etc. Having a plain old IO port to make it easy for developers seemed to escape the USB designers. The closest thing to a raw pipe is CDC serial, which is a subset of the whole comms device class, designed to include modems, fax machines etc, which were assumed to be the only things that would require COM port type functions.If anyone has tried it, can libusb be used to create a cross platform "direct" comms? Or at least a uniform device interface.

author: zapta
author_rank: Super Contributor
timestamp: January 25, 2015, 06:03:09 pm
content: Quote from: donotdespisethesnake on January 25, 2015, 11:23:41 amIt looks very good. Thanks. Always struggled with Java when it came to serial ports.