2010-09-04 03:17 PM
Hallo @ All,
I'm just starting with microcontrollers, and my first one is stm8s-Discovery. GPIO, PWM and some functions of Timers I already understood, but what I still would like to learn is to write in C is an interrupt. Is it possible to write an interrupt without a timer? Could someone give me simple example for an capcom interrupt with this specification: lets say PD0 is Output, Hight (LED onboard is off at the begining) And PE6 is Input ( GPIO_Init(GPIOD, GPIO_PIN_0, GPIO_MODE_OUT_PP_HIGH_FAST);) And the interrupt should check, if the PE6 is LOW or Hight and set PD0 to LOW or hight. I would be very thankfull for your help. Best regards - Salvador2011-01-08 08:36 AM
Brahimi, the Application Note AN3266 and the accompanying code has an example of simple interrupt processing.
Chris