how to handle teensy programming

Status
Not open for further replies.

Fatima_H

Active member
hello every one
I need your help
I need to deeply understand the internal structure of Teensy to be able to write right codes for teensy, or in other words I need to understand how MK20DX128 work.

I read its datasheet but its not enough for me, it dont talk about how I can programm its register with c language!
I would like to start to learn that with a good related_website (something similar to this https://www.newbiehack.com/MicrocontrollerTutorial.aspx ), so can any one provide me with such one or direct me to the right way to handle teensy (or MK20DX128) programming.

please help!

thanx
 
Note: MK20... Is for Teensy 3.1/3.2 boards... Other teensy boards have different processors...

All of these boards are ARM M3/M4 based boards (except LC with is M0)... So if you really want to understand the architecture, there is a link to a great book about M3/4 with all of the details:
https://www.amazon.com/dp/0124080820

But it really depends on what it is you wish to do. That is if you wish to understand how (from your other thread) analogRead works, the easiest thing to do is just use it. If you really want to understand it, then look at the sources. The sources for this on my machine current code: d:\arduino-1.8.3\hardware\avr\cores\teensy3\analog.c In that file you will see how it sets all of the registers.... Of which you then look at the datasheet to understand what each of these registers are.

But again normally it is best to NOT try to directly touch the registers as this then makes your code harder to work with other boards. And in many case if you wish to use more of the capabilities of some portion of the architecture than often there are other libraries available to do that, again with Analog there is the ADC library...
 
KurtE
Again your answer is very helpful.
at this time I need to write some codes as soon as possible, latter on, I will try to understand the internal structure and I will start with the book you mentioned above

Again thanx a lot and a lot :))
 
Last edited:
at this time I need to write some codes as soon as possible, latter on, I will try to understand the internal structure and I will start with the book you mentioned above

Have you simply used Teensy yet with any of the tutorials or audio library or other Arduino-based stuff?

Normally I recommend that book for people who want to learn the deeper details. But you should *not* start with such complex low-level details. Begin by simply using Teensy from Arduino to do a project. Learn how things work the simple and easy way before you put a lot of time into the difficult details.

For a quick car analogy, first learn how to drive the car before you try to rebuild the engine!
 
Status
Not open for further replies.
Back
Top