Author Topic: Looking for a way forward with Microcontrollers/Microprocessors  (Read 21215 times)

0 Members and 1 Guest are viewing this topic.

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Looking for a way forward with Microcontrollers/Microprocessors
« on: January 19, 2015, 04:54:49 am »
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?
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #1 on: January 19, 2015, 05:47:48 am »

I considered ARM but I can't figure out a good place to start with that either.

any suggestions?

Start HERE. It's free! (well, except for the $20 for the Tiva C board).
« Last Edit: January 19, 2015, 05:50:40 am by mtdoc »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #2 on: January 19, 2015, 07:47:29 am »
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!
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #3 on: January 19, 2015, 07:51:40 am »
I considered ARM but I can't figure out a good place to start with that either.

any suggestions?

Yes, 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 ;-) 
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #4 on: January 19, 2015, 08:19:06 am »
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=G141578608433

1GB 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 :-)
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #5 on: January 19, 2015, 10:10:08 am »
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.


 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26682
  • Country: nl
    • NCT Developments
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #6 on: January 19, 2015, 12:31:01 pm »
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.
Look 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.
« Last Edit: January 19, 2015, 12:51:53 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #7 on: January 19, 2015, 01:09:07 pm »
Quote
I considered ARM

You 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7281
  • Country: nl
  • Current job: ATEX product design
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #8 on: January 19, 2015, 01:12:33 pm »
isn't very good for low power devices.
Most 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 modes
STM32L100 Ultra-low-power mode + RTC: 900 nA with backup registers

I 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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #9 on: January 19, 2015, 01:19:36 pm »
Quote
I can't figure out a good place to start with that either.

Specifically, 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #10 on: January 19, 2015, 04:01:44 pm »
I considered ARM but I can't figure out a good place to start with that either.

any suggestions?

Pmurray4, 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 board https://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.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #11 on: January 19, 2015, 06:30:25 pm »
The PIC24 series is a nice upgrade from the 16s and 18s, without changing too much. Making the switch to PIC32 is a bigger leap, and to ARM is huge. Depends how adventurous you are feeling, and what your goal is. ARM has lots of processing power, but isn't very good for low power devices. For typical microcontroller stuff like controlling things and replacing logic the PIC24 series is probably best.

Generally 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.
 

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
    • Kråketær
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #12 on: January 19, 2015, 06:44:48 pm »
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.
-- Aussie living in the USA --
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #13 on: January 19, 2015, 09:17:24 pm »
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.

Unless if the OP's goal is to learn something new ;-)
 

Offline ralphd

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #14 on: January 19, 2015, 10:14:43 pm »
I think it's hard to beat the Cypres 4200 development board at only $4.
http://www.cypress.com/?rID=92146

I think the shipping might even be free now.
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #15 on: January 19, 2015, 10:33:49 pm »
Quote
I'd agree regarding the Tiva C launchpads

The 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #16 on: January 19, 2015, 10:34:46 pm »
Quote
it's hard to beat the Cypres 4200 development board at only $4.

Depending on how your perceive value.

To me, low price alone isn't a reason enough to use a chip.
================================
https://dannyelectronics.wordpress.com/
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #17 on: January 19, 2015, 10:51:00 pm »
Quote
I'd agree regarding the Tiva C launchpads

The 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.

If 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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #18 on: January 19, 2015, 11:52:37 pm »
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 it

I 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
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #19 on: January 20, 2015, 12:42:24 am »
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.
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #20 on: January 20, 2015, 01:09:26 am »
I wouldn't invest anything in PIC32.

Why 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.
Complexity is the number-one enemy of high-quality code.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #21 on: January 20, 2015, 01:20:29 am »
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.

 

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
    • Kråketær
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #22 on: January 20, 2015, 02:58:00 am »
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.

mplabx 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!

-- Aussie living in the USA --
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #23 on: January 20, 2015, 04:17:11 am »
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?

Hi 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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #24 on: January 20, 2015, 04:41:00 am »
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 ;)
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #25 on: January 20, 2015, 05:00:30 am »
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 ;)

Hi 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-world

The hello_world.cpp example is for lpcxpresso. The .bin file I got seems to be from mbed.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #26 on: January 20, 2015, 05:11:33 am »
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
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #27 on: January 20, 2015, 07:05:05 am »
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

My bad, I should have given you this direct link

https://github.com/zapta/arm/tree/master/pro-mini#quick-start-3---installing-the-lpcxpresso-ide-and-compiling-hello-world
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #28 on: January 20, 2015, 07:44:23 am »
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.

I love the smell of FR4 in the morning!
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #29 on: January 20, 2015, 09:36:50 am »
Quote
I'll be basically taking the plunge and learning almost from scratch [because CCS was weird]
Not 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.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #30 on: January 20, 2015, 10:47:06 am »
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   
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #31 on: January 20, 2015, 11:22:11 am »
Very ghetto-ish - liked that. I have a few PIC24F on pcb adapter boards too.

Really nice chips. Way under-marketed by Microchip.
================================
https://dannyelectronics.wordpress.com/
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #32 on: January 20, 2015, 12:36:34 pm »
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.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #33 on: January 20, 2015, 01:10:56 pm »
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?
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #34 on: January 20, 2015, 01:37:40 pm »
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...
 
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #35 on: January 20, 2015, 01:41:09 pm »
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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #36 on: January 20, 2015, 01:44:16 pm »
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.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #37 on: January 20, 2015, 01:53:33 pm »
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.

Even 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.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #38 on: January 20, 2015, 05:11:30 pm »
Quote
I'll be basically taking the plunge and learning almost from scratch [because CCS was weird]
Not 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.

Man, 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.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #39 on: January 20, 2015, 05:38:29 pm »
I'm still trying to decide which IDE to devote my energy to.

Eclipse 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.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #40 on: January 20, 2015, 05:47:09 pm »
I'm still trying to decide which IDE to devote my energy to.

Eclipse 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.

CCS is Eclipse based, isn't it?
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #41 on: January 20, 2015, 05:53:26 pm »
I'm still trying to decide which IDE to devote my energy to.

Eclipse 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.

CCS is Eclipse based, isn't it?

Yes, 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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #42 on: January 20, 2015, 05:54:46 pm »
I don't know about the latest releases but none of the versions I've used were.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #43 on: January 20, 2015, 06:12:24 pm »

Yes, 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.

Thanks. 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.
« Last Edit: January 20, 2015, 06:13:56 pm by mtdoc »
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #44 on: January 20, 2015, 06:50:05 pm »
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 :P
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #45 on: January 20, 2015, 06:51:10 pm »
Quote
I don't know about the latest releases but none of the versions I've used were.

There are three different CCSs, two mentioned inter-changeably in this thread.

They are night-and-day different from each other and are completely unrelated.
================================
https://dannyelectronics.wordpress.com/
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #46 on: January 20, 2015, 09:16:57 pm »
Quote
I don't know about the latest releases but none of the versions I've used were.

There are three different CCSs, two mentioned inter-changeably in this thread.

They are night-and-day different from each other and are completely unrelated.

Indeed.

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.

 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #47 on: January 20, 2015, 11:13:19 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.

The 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.
Complexity is the number-one enemy of high-quality code.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #48 on: January 21, 2015, 02:49:19 am »
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 :)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #49 on: January 21, 2015, 05:08:06 am »
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 :)

I 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.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #50 on: January 21, 2015, 05:47:13 am »
I'm looking forward to what the EdX course teaches me, it starts tomorrow :)

The 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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #51 on: January 21, 2015, 05:54:42 am »
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.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #52 on: January 21, 2015, 05:57:16 am »
Lectures are released as videos (youtube I believe) that you can watch at your convenience. 
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #53 on: January 21, 2015, 07:50:21 pm »
About the edx course. I did register for this as well
FYI 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.html

There 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.
 
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #54 on: January 21, 2015, 08:18:06 pm »
This course deserves a thread of its own if we don't have one already.
 

Offline ElektroQuark

  • Supporter
  • ****
  • Posts: 1244
  • Country: es
    • ElektroQuark
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #55 on: January 21, 2015, 08:26:43 pm »
I'm in too.
It's highly recommended so  I will try to find the necesary time.

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #56 on: January 22, 2015, 04:23:11 am »
About the edx course.

...

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.


After 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.
 

Offline jerry507

  • Regular Contributor
  • *
  • Posts: 247
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #57 on: January 22, 2015, 04:44:59 am »
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.
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #58 on: January 22, 2015, 05:44:38 am »
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 too :)

jerry507: 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 restrictions :) Until I actually start doing real coding I won't know for certain if it would be a real problem.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #59 on: January 22, 2015, 06:09:29 am »
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).

The 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.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #60 on: January 22, 2015, 09:12:37 am »
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 too :)

jerry507: 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 restrictions :) Until I actually start doing real coding I won't know for certain if it would be a real problem.

I 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).

« Last Edit: January 22, 2015, 09:16:48 am by miguelvp »
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #61 on: January 22, 2015, 09:21:01 am »
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!)
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #62 on: January 22, 2015, 09:25:57 am »
Quote
got carried away and did 2 weeks worth of activity in the past 6 hours,
It'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.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #63 on: January 22, 2015, 09:30:27 am »
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.
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #64 on: January 22, 2015, 10:08:14 am »
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...


 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #65 on: January 22, 2015, 04:13:10 pm »
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!)

The 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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #66 on: January 22, 2015, 04:20:09 pm »
Quote
in you can't check the MCUs registers, flags or debug in assembly

Open up the disassembly window and step through instructions in it.
================================
https://dannyelectronics.wordpress.com/
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #67 on: January 22, 2015, 11:42:05 pm »
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!
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #68 on: January 24, 2015, 10:25:41 am »
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 convenient :) no 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.
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #69 on: January 24, 2015, 12:27:30 pm »
... 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.

On 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.
my random ramblings mind-dump.net
 

Offline ehughes

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #70 on: January 24, 2015, 02:08:58 pm »
Quote
is this common or NXP specific?

Not 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, etc


The Arduino "load and see what happens" is so primitive.     Use the debugger... It makes your life easier.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #71 on: January 24, 2015, 04:02:46 pm »
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 convenient :) no 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.

Yes, 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.sh

I 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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #72 on: January 24, 2015, 04:24:40 pm »
Quote
I refuse to use any chip that doesn't have a ROM bootloader.   In this day and age, it is simply a must.

Quote
The Arduino "load and see what happens" is so primitive.     Use the debugger... It makes your life easier.

They are not terribly consistent.
================================
https://dannyelectronics.wordpress.com/
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #73 on: January 24, 2015, 05:54:13 pm »
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.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #74 on: January 24, 2015, 06:05:30 pm »
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.

Java 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.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #75 on: January 24, 2015, 06:11:30 pm »
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.

I 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.
Bob
"All you said is just a bunch of opinions."
 

Offline pmurray4Topic starter

  • Contributor
  • Posts: 25
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #76 on: January 24, 2015, 08:46:47 pm »
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?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26682
  • Country: nl
    • NCT Developments
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #77 on: January 24, 2015, 09:24:34 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #78 on: January 25, 2015, 12:05:13 am »
I used pyserial on Mac OSX but without GUI.
 

Offline enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #79 on: January 25, 2015, 10:04:05 am »
Qt comes with QSerialPort. I used it on Windows and Linux and it worked out of the box with both OS.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #80 on: January 25, 2015, 11:23:41 am »
I haven't done much Java, but I have used JSSC which worked quite well https://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.
Bob
"All you said is just a bunch of opinions."
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: Looking for a way forward with Microcontrollers/Microprocessors
« Reply #81 on: January 25, 2015, 06:03:09 pm »
I haven't done much Java, but I have used JSSC which worked quite well https://github.com/scream3r/java-simple-serial-connector.

It looks very good. Thanks. Always struggled with Java when it came to serial ports.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf