Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] New to Microcontrollers

Status
Not open for further replies.

styojm

Newbie level 4
Newbie level 4
Joined
Oct 12, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
50
Hi Everyone
I'm new to these microcontrollers. One thing that I'm wondering about is: for microcontrollers from different companies, is there a general purpose SPI and coding compiler that suit all products? Or different companies have their own style?
 

Not exactly companies, MCUs differs by their architectures. Compilers are found separate for PICs, 8051s, ARM, etc. Also in these categories, there are many sub categories of MCUs and they all come with different compilers & programmers. You have to choose any specific MCU which suits your job, and go with it. If you are new, start with 8051 & PIC.
 

Hello!

If I understand your question, you are apparently wondering about portability.
As written above, as the architectures are very different from one MCU to the other, there is no almighty compiler.
BUT: what you usually start to do when you develop hardware is to write low level functions. In case of SPI, you
can write functions like for instance (you have usually more than one SPI engine on a processor):

Code:
void SPI0Init(uint16 baudrate);
void SPI1Init(uint16 baudrate);
void SPI2Init(uint16 baudrate);
uint8 SPI0SendByte(uint8 byte);
…
etc...

Write this in SPI.h, write the implementation in SPI.c for any processor you want to support, and then
SPI will work for any of these processors. Then you can port any code written using SPI.h / SPI.c.

C is basically portable, but you have to write the low-level stuff if it does not exist or if you don't like it.

Dora.
 

Hi Genovator
Thanks for the reply. Is there a table where I can find main features of these different categories of MCUs and their possible applications?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top