I'm having diffuculties differentiating between Interrupts and subroutines. I understand how to program an interrupt (more or less) but I'm not quiet sure how to activate it. How can I use my interrupt once I've set it into the the vector table??? joe --------------------------------- Post your free ad now! Yahoo! Canada Personals |
Interrupts
Started by ●November 22, 2003
Reply by ●November 24, 20032003-11-24
I have been using AS 12 and the * is a shorthand way to set a label to go back to the same line -- I have used it on all the 68HC12 microcontrollers A4, B32, DP256, and D60 with the AS12 assembler and had no problems. Of course it is just a shorthand for xxx brclr PORTA,#$01 xxx. I have seen this used a lot in Huang's book and in others: it confused me until I saw an explanation of the *. Go to the ICC screen to register the ICC compiler and write down the hex number shown and send imagecraft an email - they will send back a hex number to enter to enable your installation. Did you try going to this same menu and try to export to the original floppy disk to uninstall the setup? the way ICC set this up is to take a key off the install floppy and import to the ICC IDE and if you want to use the compiler on another machine, export from the install back to the floppy and import on the other machine: a real pain in the ass! You can get multiple keys from imagecraft like I did, but you have to pester them via email. Sydney ----- Original Message ----- From: suhaib al khazali To: Sent: Sunday, November 23, 2003 3:33 PM Subject: Re: [68HC12] Re: Interrupts hi I am using imagecraft ICC12 V6 for programing my controller. but I had series problem in my computer then I had to format it but I forgat to trnsfer my license of ICC12 to a floppy. I reinstall the application again. it acts like a demo vergin unless it is licensed. I sent the imagecraft a massege to tell them about the problem but they didn't reply yet. can u help me? do u have a solution? plz bi suhaib theobee00 <> wrote: --- In , "Sydney Faria" wrote: > first glance I see you are using what is called a polling method: here > nop > brclr PORTA,#$01,here > which can be written in shorthand as brclr portA, #$01 * Hi Sydney, I run into trouble with that loop. Since these newfangled instructions are er, new to me, I am not 100 percent sure, but when I used that loop I found when you have say an overrun condition setting extra bits, the test for #$01 fails and your programs hangs up. I ended up reverting back to the trusty Anding with #%mask operation, that always works since it only checks the specific bit. Or did I miss something? Cheers, Theo -------------------- ">http://docs.yahoo.com/info/terms/ --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger -------------------- |
|
Reply by ●November 24, 20032003-11-24
--- In , "Sydney Faria" <n1huq@h...> wrote: > I have been using AS 12 and the * is a shorthand way to set a label to go > back to the same line -- I have used it on all the 68HC12 microcontrollers > A4, B32, DP256, and D60 with the AS12 assembler and had no problems. Of > course it is just a shorthand for xxx brclr PORTA,#$01 xxx. I have seen > this used a lot in Huang's book and in others: it confused me until I saw > an explanation of the *. As I said, I am no expert on the new instructions so correct me if I am wrong, but as I understand that one, it does a port value compare with #$01 and branches on self if it fails. The problem I had was that if for some reason there is say an overrun, the match will never happen, it hangs. The solution is either have the instruction embedded in a time loop that can break out of the hang, or do a bit compare instead of a word, that way you can ignore other conditions. Cheers, Theo |
Reply by ●November 27, 20032003-11-27
As far as I can tell the * simply is a shorthand notation for the present
PC value and this polling technique is used, with or without the shorthand notation, any time one wants to monitor a bit for some sort of change. The brclr and brset instructions have been around for a while now. Any time you want to wait for some small time period there are three ways to do the wait: use a timer, but make sure that it has a long enough wait, use an interrupt, or poll a bit to see when to procede. In the very large application that I am working on, I have occasion to do a lot of rs232 work and the polling method is very efficient for my purposes; however, if I wanted for predictability, maybe a timed wait would be better for a tight real-time application. Sydney Faria ----- Original Message ----- From: theobee00 To: Sent: Monday, November 24, 2003 5:16 PM Subject: [68HC12] Re: Interrupts --- In , "Sydney Faria" <n1huq@h...> wrote: > I have been using AS 12 and the * is a shorthand way to set a label to go > back to the same line -- I have used it on all the 68HC12 microcontrollers > A4, B32, DP256, and D60 with the AS12 assembler and had no problems. Of > course it is just a shorthand for xxx brclr PORTA,#$01 xxx. I have seen > this used a lot in Huang's book and in others: it confused me until I saw > an explanation of the *. As I said, I am no expert on the new instructions so correct me if I am wrong, but as I understand that one, it does a port value compare with #$01 and branches on self if it fails. The problem I had was that if for some reason there is say an overrun, the match will never happen, it hangs. The solution is either have the instruction embedded in a time loop that can break out of the hang, or do a bit compare instead of a word, that way you can ignore other conditions. Cheers, Theo -------------------- |