Download presentation
Presentation is loading. Please wait.
1
Example 17 SCI Receive Interrupts
Lecture L7.3
3
// Example 17: SCI using receive interrupts
#include <hidef.h> /* common defines and macros */ #include <mc9s12dp256.h> /* derivative information */ #include "queue.h" #include "main_asm.h" /* interface to the assembly module */ #pragma LINK_INFO DERIVATIVE "mc9s12dp256b" // SCI0 receive Interrupt Service Routine void interrupt 20 handler(){ qstore(read_SCI0_Rx()); }
4
void main(void) { char c; PLL_init(); // set system clock frequency to 24 MHz lcd_init(); // enable lcd SCI0_int_init(9600); // initialize SCI0 at with interrupts while(1){ while(qempty() != 0){ // empty the queue c = getq(); // and display on lcd data8(c); // write it to the LCD outchar0(c); // echo it back }
5
Use host.exe to download any text file to the miniDragon+ board
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.