Author Topic: Searching for microcontroller for lower level look  (Read 4289 times)

0 Members and 1 Guest are viewing this topic.

Offline elissaiosTopic starter

  • Newbie
  • Posts: 4
Searching for microcontroller for lower level look
« on: June 24, 2014, 11:50:52 am »
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?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Searching for microcontroller for lower level look
« Reply #1 on: June 24, 2014, 12:07:35 pm »
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.
================================
https://dannyelectronics.wordpress.com/
 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: Searching for microcontroller for lower level look
« Reply #2 on: June 24, 2014, 12:18:20 pm »
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.
"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline nuhamind2

  • Regular Contributor
  • *
  • Posts: 138
  • Country: id
Re: Searching for microcontroller for lower level look
« Reply #3 on: June 24, 2014, 12:41:08 pm »
Just ditch the Arduino IDE. You need to understand the basic if C language first though.
 

Offline dajt

  • Contributor
  • Posts: 18
  • Country: au
Re: Searching for microcontroller for lower level look
« Reply #4 on: June 24, 2014, 11:21:54 pm »
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.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: Searching for microcontroller for lower level look
« Reply #5 on: June 25, 2014, 12:39:35 am »
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 AVR

So 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.
« Last Edit: June 25, 2014, 12:43:13 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Searching for microcontroller for lower level look
« Reply #6 on: June 25, 2014, 12:49:09 am »
Quote
That's not really what you want if your plan is to understand MCUs at their basic register level.

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

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Searching for microcontroller for lower level look
« Reply #7 on: June 25, 2014, 03:32:40 pm »
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?

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

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Searching for microcontroller for lower level look
« Reply #8 on: July 05, 2014, 09:39:12 pm »
What do you suggest me?

Stick 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 manipulation https://github.com/zapta/linbus/blob/master/analyzer/arduino/io_pins.h and here is an example for a low level serial communication https://github.com/zapta/linbus/blob/master/analyzer/arduino/sio.h . You can find many other examples.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: Searching for microcontroller for lower level look
« Reply #9 on: July 06, 2014, 02:06:52 pm »
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. 
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline MJR

  • Contributor
  • Posts: 12
  • Country: us
Re: Searching for microcontroller for lower level look
« Reply #10 on: July 06, 2014, 03:35:13 pm »
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.
 

Offline bobcat

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: Searching for microcontroller for lower level look
« Reply #11 on: August 11, 2014, 05:42:48 pm »
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 called avrfreaks.net that is very helpful for programming Atmel chips as well.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Searching for microcontroller for lower level look
« Reply #12 on: August 11, 2014, 06:30:51 pm »
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
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Searching for microcontroller for lower level look
« Reply #13 on: August 12, 2014, 02:47:14 am »
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: [...]
Very cool. On my reading list. BTW, how did you do those timing diagrams? LaTeX?
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Searching for microcontroller for lower level look
« Reply #14 on: August 12, 2014, 03:46:30 am »
Very cool. On my reading list. BTW, how did you do those timing diagrams? LaTeX?
Ditto :) , ditto, and it looks like he used tikz-timing.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Searching for microcontroller for lower level look
« Reply #15 on: August 12, 2014, 12:38:30 pm »
in case of Atmel Studio, my only advice is: you'd better buy the "dragon programmer" (aka avr 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!

edit
i added the link to the Atmel product.
« Last Edit: August 12, 2014, 04:15:27 pm by legacy »
 

Offline sporadic

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
    • forkineye.com
Re: Searching for microcontroller for lower level look
« Reply #16 on: August 12, 2014, 04:44:49 pm »
in case of Atmel Studio, my only advice is: you'd better buy the "dragon programmer" (aka avr 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!

edit
i added the link to the Atmel product.
The 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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf