Searching for microcontroller for lower level look - Page 1
Forum section: electronics / general

author: elissaios
author_rank: Newbie
timestamp: June 24, 2014, 11:50:52 am
content: Hallo to all people here,I have make some projects with arduino.Now i wanna move to lower level.I wanna learn a microcontrollers architecture,peripherals how the communicate how we write to registers,to wire my own libraries and not find all the things prepered.i wanna learn how spi/uart/usart/usb works how we connect them or to understand how the works if they are already connected for exaple tx,rx.After i feel that i have understand all these i wanna move to highter level and use a mcu with OS or RTOS.I think that the knowledge that i will take from all these will be valuable and nesseccary.So i need a simple architecture,assebly,peripherals mcu with the capability to take RTOS like ZSTACK ,or Contiki or other populars.Maybe i need a simpler mcu 8bit and then to move to mcu with rtos which are 16/32 bits.What do you suggest me?

author: dannyf
author_rank: Super Contributor
timestamp: June 24, 2014, 12:07:35 pm
content: It is fairly easy to code to the lowest level: you just need to read the datasheet and that's fairly simple for 8-bit mcus.As to running RTOS: it depends on your definition of RTOS. Generally, the 8-bit chips aren't that great for that. I would go to a 32-bit chip like the ARM / MIPS.

author: bwat
author_rank: Frequent Contributor
timestamp: June 24, 2014, 12:18:20 pm
content: If you have an Arduino board then you have an example of a well documented microcontroller which you can easily programmer at a low level. I also assume you have a PC so you have an example of a 32 or 64 bit CPU. You've got everything you need already. There is tons of documentation on the net.If you're interested in hard RTOS design you can have a look at my attempt at the simplest possible hard RTOS. The kernel is described in this little booklet:http://barrywatson.se/download/Everyman.pdf. The code is here:http://barrywatson.se/download/Everyman.tar.gz.

author: nuhamind2
author_rank: Regular Contributor
timestamp: June 24, 2014, 12:41:08 pm
content: Just ditch the Arduino IDE. You need to understand the basic if C language first though.

author: dajt
author_rank: Contributor
timestamp: June 24, 2014, 11:21:54 pm
content: Your quickest and cheapest option is to download Atmel Studio and start programming the AVR on your Arduino in plain C.If you want a change of architecture consider a TI MSP430 launchpad. Cheap as, free fast shipping, free dev tools.

author: Psi
author_rank: Super Contributor
timestamp: June 25, 2014, 12:39:35 am
content: IMHO it's much easier to understand a 8bit ATmega/tiny at the register level than a 32bit ARM CPU.Purely because the ARM is so much more complicated, and the ATmega/tiny datasheets are really well layed out with good functional descriptions and C + asm examples throughout.With ARM cpus, like the STM32, the peripherals are complex enough that most people use the bundled libraries to talk with the hardware instead of using raw registers. That's not really what you want if your plan is to understand MCUs at their basic register level.From a price point of view an ARM mcu is more powerful for less money than an AVRSo for an introduction to MCU's at their basic level a ATmega/tiny is a really good idea but i wouldn't try to build a new product with one due to the price/speed vs ARM mcus.

author: dannyf
author_rank: Super Contributor
timestamp: June 25, 2014, 12:49:09 am
content: QuoteFor most people, the reason to understand MCUs is to use them. From that perspective, it makes sense to just rely on the library.In my case, I actually put a layer on top of the libraries and write code with that middle layer. This allows me to migrate code from one mcu to another, or to eliminate certain library modules if I need more performance, without any change at my source code levels.

author: retrolefty
author_rank: Super Contributor
timestamp: June 25, 2014, 03:32:40 pm
content: Quote from: elissaios on June 24, 2014, 11:50:52 amWell the arduino platform includes all the source code for all the libraries they provide so you certainly can read them to see how they interface down to the hardware register level. You could then start replacing them with your own library/functions on a pace comfortable for your experience level.i guess what I'm saying is that is not necessary to dump the arduino IDE to accomplish what you stated. However if your goals include learning and using a more complex/powerful IDE then moving on from the arduino IDE would be necessary.

author: zapta
author_rank: Super Contributor
timestamp: July 05, 2014, 09:39:12 pm
content: Quote from: elissaios on June 24, 2014, 11:50:52 amStick to your Arduino hardware and IDE and just stop using the Arduino library. Once you do it your program is practically a general avr-gcc program with nothing Arduino specific. For example, implement your own pin manipulation methods (mode, set, read, etc), your own serial communication, your own delay and so on.Here is an example for a lower level pin manipulationhttps://github.com/zapta/linbus/blob/master/analyzer/arduino/io_pins.hand here is an example for a low level serial communicationhttps://github.com/zapta/linbus/blob/master/analyzer/arduino/sio.h. You can find many other examples.

author: 22swg
author_rank: Frequent Contributor
timestamp: July 06, 2014, 02:06:52 pm
content: This sort of question seems to crop up regularly here , you will get several possible ideas, but you started by running instead of walking , just get some mc kit any flavor but not ancient and hit the data sheets.

author: MJR
author_rank: Contributor
timestamp: July 06, 2014, 03:35:13 pm
content: Ok, just noticed several mentions of Atmel Studio already in this thread. Duh. But hey, I typed it so I hate to waste it.I agree with others that you have most of what you need already. Given that you want more visibility to the "inner-workings" I would suggest getting Atmel Studio which is free. It is a huge step up from the Arduino IDE. You can have real time register display, and an infinitely better interface. You could open the source for a library and follow it as your calls make changes on the hardware. Then start your own hardware interface library to do just what you want at the level you want. Common interface for different architectures is a help too. If you have only worked in the Arduino IDE I would really recommend this as a first step. And the price is right.

author: bobcat
author_rank: Regular Contributor
timestamp: August 11, 2014, 05:42:48 pm
content: Yes, I agree with getting the Atmel Studio IDE. You can download the Arduino for Atmel Studio add in and still use Arduino Libraries as well. It also programs the Arduino in the same way as the Arduino IDE. So, you can transition from Arduino to more direct C programming as you learn about microcontroller programming. There is a forum calledavrfreaks.netthat is very helpful for programming Atmel chips as well.

author: legacy
author_rank: Super Contributor
timestamp: August 11, 2014, 06:30:51 pm
content: my advices are:1) try Keil/Arm, it comes with a great IDE and a wonderful debugger, all you need for embedded-C!2) forget AVR8, and any 8 bit MPUs, buy an ARM board compatible with Ulink-2 (Keil debugger)3) forget complex MPUs, they will only make you frustrated, the same is 2)4) buy the ucOS/2 book and port it to the ARM board, you can be successfully powered by the KEIL ecosystem, this KERNEL is also well documented and explained in the book and it is easy to be ported, also useful usage

author: andyturk
author_rank: Frequent Contributor
timestamp: August 12, 2014, 02:47:14 am
content: Quote from: bwat on June 24, 2014, 12:18:20 pmVery cool. On my reading list. BTW, how did you do those timing diagrams? LaTeX?

author: mrflibble
author_rank: Super Contributor
timestamp: August 12, 2014, 03:46:30 am
content: Quote from: andyturk on August 12, 2014, 02:47:14 amDitto, ditto, and it looks like he used tikz-timing.

author: legacy
author_rank: Super Contributor
timestamp: August 12, 2014, 12:38:30 pm
content: in case of Atmel Studio, my only advice is: you'd better buy the "dragon programmer" (akaavr dragon, click), it is an USB-ICE compatible with AVR-Studio and it allows you to do debugging. Very cool from my point of view!editi added the link to the Atmel product.

author: sporadic
author_rank: Regular Contributor
timestamp: August 12, 2014, 04:44:49 pm
content: Quote from: legacy on August 12, 2014, 12:38:30 pmThe Atmel ICE Basic is the same price now at $50. Encased product and supports Atmel's ARM chips as well.http://store.atmel.com/PartDetail.aspx?q=p:10500377;c:100112#tc:description