Hello!
I need a program for my DEMO9S12XEP100 Board. I want, that a light is flashing. PA3 for example.
Can you please give me such an easy program? I want to learn with this program, how my board works.
Thank you very much!
Best regards!
hi,
it is very easy and if u hv a demokit with u , u can get the demo program that has light (LED) blinking . You did not even mention the delay for blinking the led. Anyhw, below is the program with a small delay that will on and off ur led connected to portA.
#include <hidef.h>
#include "derivative.h"
void delay(void);
void delay(void)
{
unsigned int i;
for(i=0;i<40000;i++);
}
void main(void)
{
DDRA= 0x0F; //to make lower nibble of PORTA as output
a:
PORTA_PA0=1;
delay();
PORTA_PA0=0;
delay();
goto a;
}/*end of main*/
All the best!
Thank you a lot! It works great! Now I have a little bit more knowledge on how my new microcontroller works!
Before this one I had the HC12.
THX!!!
Fine. All the best!!!!