Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Hi, i have a project that deals with interrupts. I need to call 2 interrupts and one of them, an RTI for counting, but the counting code has to be in the MAIN routine and not in the ISR. Can you please tell me how to do this? and how to call 2 interrupts, one for counting and the other to check if an input has been entered.. thanks! |
|
|
|
In a message dated 11/23/03 1:15:49 AM Eastern Standard Time, writes: i have a project that deals with interrupts. I need to call 2 interrupts and one of them, an RTI for counting, but the counting code has to be in the MAIN routine and not in the ISR. Can you please tell me how to do this? and how to call 2 interrupts, one for counting and the other to check if an input has been entered.. ======================================================== You 'call' a subroutine. The RTI invokes the interrupt. The rti handler should set a flag. The main loop checks the flag, it its set, increments the counter and clears the flag. Same thing in the other handler. Set a flag when you enter it, check it and clear it somewhere else. [Non-text portions of this message have been removed] |
|
I assume your main program is a loop with COPCTL in it as I have done: so, use a flag to enter a portion of the loop only when one of the ints has occurred, this is where you process the funtionality that you desire and use globals to pass flags and/or variables from the int routines as needed. SCF ----- Original Message ----- From: Find out~~!! To: Sent: Sunday, November 23, 2003 1:15 AM Subject: [68HC12] Help! Hi, i have a project that deals with interrupts. I need to call 2 interrupts and one of them, an RTI for counting, but the counting code has to be in the MAIN routine and not in the ISR. Can you please tell me how to do this? and how to call 2 interrupts, one for counting and the other to check if an input has been entered.. thanks! Yahoo! Groups Sponsor -------------------------------------------------------- To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] |
|
ADVERTISEMENT Hi, I have been using ImageCraft C and the Adapt9S12DP256 successfully for over 7 months, until last night. I went to erase and program the flash like I usaully do, but my entries will not show up. I get the following, but if i enter any characters, nothing will show up: D-Bug12 Bootloaderv1.0.0 a) Erase Flash b) Program Flash c) Set Baud Rate d) Erase EEPROM ? every time I restart, it prints the menu out like it should, but still, no keys I push print anything. If I run the program, it displays everything correctly as it runs. I dont know if this is a bootloader, icc12, or computer/cable? problem. Please help! Thank you ~Julian |