Programming of Microcontrollers and other peripherals

Thread Starter

Electronic_Maniac

Joined Oct 26, 2017
253
Hi all,

This is a question based on the theory which I am reading and related one design which I am trying to understand section by section

This is loosely based on a question which I previously asked and I haven't received the proper clarity.

We are having microcontrollers and some peripherals are connected to it.

Ex.
Microcontroller https://www.nxp.com/docs/en/data-sheet/MPC5606S.pdf
EEPROM (16Kb)https://www.onsemi.com/pub/Collateral/CAT24C01-D.PDF
SPI Flash (256Mb) http://www.cypress.com/file/448601/download

The microcontroller is connected to the EEPROM and SPI Flash.

Please check if my understanding is correct :

The software code for the microcontroller needs to stored in a separate non-volatile memory. So, that's why we are storing the boot code in the EEPROM which is a non volatile memory. And we have TFT data which needs to be displayed present in the SPI flash.

Forgive me if my question is too basic.

1. Once we write the software code for the microcontroller in our PC, how do we load it into the microcontroller?
2. How is the TFT information (transferred to) stored in the SPI Flash?

How are these done using Hardware?

3. And in my design, it is mentioned that the SPI Flash operates at 48MHz. How do we arrive at the operating frequency?

Please explain in simple terms as I couldn't grasp the answers mentioned in the previous similar thread.

Thank you all.
 

spinnaker

Joined Oct 29, 2009
7,830
Most modern microcontrollers now have onboard memory so it is not external. Regardless the micro controller addresses the memory on the bus whether internal or external. On power up the microcontroller will automatically fetch an instruction from a specified address. The program counter is incremented by the microcontroller and the next instruction executed and so on and so on.

In the old days this code was stored in ROM. A ROM might contain a machine langue monitor, assembler or possibly even a BASIC interpreter that allowed the programmer to load a program into RAM using switches, keypad, keyboard , paper tape, magnetic tape etc.

Now many microcontrollers use non volatile RAM. The RAM is loaded using a programmer like a PIcKit (for pics for example)
 

Thread Starter

Electronic_Maniac

Joined Oct 26, 2017
253
If you need all that explained to you, you simply MUST choose a less ambitious project to start with; the one you are planning will overwhelm you and leave you frustrated, confused and exhausted.

START SIMPLE.
This is an already existing design which I am trying to understand.

And all my questions are based on theory only and not practical.

This practical design just made me question the theory. Please explain if you could.
 

ericgibbs

Joined Jan 29, 2010
18,872
This is loosely based on a question which I previously asked and I haven't received the proper clarity.
hi EM,
Your other Thread was a query on I2C, which IMO was answered in detail.
This Thread topic is for SPI connected peripherals.

Please ask a specific SPI question and I will try to help.
E
 

BobTPH

Joined Jun 5, 2013
9,003
The microcontroller you have linked has up to 1 Megabyte of internal flash memory for program storage and no capability of running programs from external ROM.

It has an external flash RAM interface built it.

It has an interface for a TFT screen, and builtin memory for the display.

The program can be loaded via a serial interface, so that is how you get the program in, or at least one way.

It is a special purpose chip designed for automobile instrument clusters including gauges and a video display. Is that what you are using it for?

Bob
 

Thread Starter

Electronic_Maniac

Joined Oct 26, 2017
253
The microcontroller you have linked has up to 1 Megabyte of internal flash memory for program storage and no capability of running programs from external ROM.

It has an external flash RAM interface built it.

It has an interface for a TFT screen, and builtin memory for the display.

The program can be loaded via a serial interface, so that is how you get the program in, or at least one way.

It is a special purpose chip designed for automobile instrument clusters including gauges and a video display. Is that what you are using it for?

Bob
Thanks Bob.
But why do you say that it has no capability of running programs from external ROM? How are you telling that?

And please send the screenshots or the page/sections where you are finding the information about the TFT and RAM and builtin memory for display.
Yes. It is a design for a automobile.
 

spinnaker

Joined Oct 29, 2009
7,830
Thanks Bob.
But why do you say that it has no capability of running programs from external ROM? How are you telling that?

And please send the screenshots or the page/sections where you are finding the information about the TFT and RAM and builtin memory for display.
Yes. It is a design for a automobile.

Its program memory is internal Just like most modern microcontollers. It can access external memory but the code can't be run there.
 

BobTPH

Joined Jun 5, 2013
9,003
I am going by the fact the the extensive feature list does not list that as a feature, and, as
@spinnaker said, microcontrollers typically can run code only from their internal memory.

Also, why would you want to add 16K of external program memory when it already has 64 times that much as internal memory?

I guess you did not get very far into the datasheet. The information on the display controller and RAM are right in the features list at the front of the datasheet you linked, page 1.

• Display Control Unit to drive TFT LCD displays
• Up to 160 KB on-chip non-ECC graphics SRAM with SRAM controller

Bob
 
Top