Led blink on Cortex M3

Thread Starter

Parth786

Joined Jun 19, 2017
642
I just installed keil in my computer for ARM. I am beginner for LM3S328. I want to work with LM3S328. I am trying to blink led on LM3S328. I don't have knowledge about LM3S328. I need to connect the LED to one of port pin and after that I have to set pin high then delay then low this process will repeat forever.
C:
/* Main.c file generated by New Project wizard
*
* Created:   Mon Feb 12 2018
* Processor: LM3S328
* Compiler:  Keil for ARM
*/

#include <lm3s_cmsis.h>

int main (void)
{

   while (1)
   {
      /* code */
   }
   
   return 0;
}
void Delay (unsigned int wait)
{
    unsigned int i;
 
    for ( i = 0; i < wait; i++)
    {
    }
}
cortex m3.jpg

Which port of pin should connect to LED ? How to set input / output port and how to set port pin low and high ?
 
Last edited:

miniwinwm

Joined Feb 2, 2018
68

be80be

Joined Jul 5, 2008
2,072
Simulator. you mean Proteus , Do you own that $7000 dollar copy ?
You going to be up for real let down when you start with hardware.
Id send you a better arm M3 to play with
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
Simulator. you mean Proteus , Do you own that $7000 dollar copy ?
You going to be up for real let down when you start with hardware.
Id send you a better arm M3 to play with
I am not refusing your advice but simulator save lot of money and now I am in situation where I have to save money. I have installed proteus by following youtube link. it's free version. should I work with lPC2138

I also want to buy an ARM board but I have some issue that i need to fix. May be I will have board after 1 month

I just wanted to learn a little programming for ARM controller before working with real hardware.
 

Brian Griffin

Joined May 17, 2013
64
That code does compile, but I'm pretty sure these 'delay' are gonna be removed by the compilation process.

As be80be said, get a cheap STM32 board + atollic true studio. It's way cheaper than simulation and it's fun. Plus,stm32 has been used by many in where one works!

Note: I only used Proteus at my former workplace. That thing is really expensive!
 

MrChips

Joined Oct 2, 2009
30,712
Why do you want to use an STM32 chip? The programming principles are the same for any MCU.
Master a simple chip such as Atmel AVR, MSP430 or PIC before venturing into the ARM architecture,
In comparison, the hardware configuration on an STM32 is ten times more complex.
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
Why do you want to use an STM32 chip? .
I want to learn programming for ARM controller because in interview they ask about it. Cortex M and LPC both are ARM core. I have cortex M (LM3S308, LPC1311FHN33) and LPC2138 in simulator. Which one should I take to learning ARM programming.

I know there is no better option then the working on real hardware but at the time I don't have real hardware but I need to learn that's why I am doing work with simulator
 

be80be

Joined Jul 5, 2008
2,072
There all in C but My point is simulator you are using is free it's free because it using a set list of chips.
atollic true studio I think has 2 k limit but it using newer chips. I've got a box of chips u you name it I bet I've had it.

In 10 years I've seen so many why is this not working post I even still have them days, But I learned one thing more then any
I should of learned C frist cause there all using it ARM ESP Arduino pic chips msp list goes on.

I took code that's been post by Ian your and Mike and have it running on a pic Not just one hell that's not fun I got it running on 16f876 16f18855
18f2550 a pic 32 then even a arduino MSP launchpad. Oh and even a 8051.

It's C I'm still no programmer but I can say that I could on any of them.

Simulator are ok I would love one now but it would cost a arm to get a full one that where as leaning tools are free to a point but once you learn you can move on faster.
 

miniwinwm

Joined Feb 2, 2018
68
I want to learn programming for ARM controller because in interview they ask about it. Cortex M and LPC both are ARM core. I have cortex M (LM3S308, LPC1311FHN33) and LPC2138 in simulator. Which one should I take to learning ARM programming.
It doesn't matter. Learn C first. Any processor or compiler will do. Then start learning ARM development on real hardware.
 
Last edited:
Top