Hiya guys, need a bit of help here I have put this code in ----------------------------------------- void noreturn (void) interrupt 1 { send_serial("Timer0 Overflow"); } ------------------------------------------ but the target is not created when this code is in. what could it be??
Just a guess - did you include a function prototype? The compiler does NOT want you to include a function prototype for interrupt functions. What exactly is the error message you get?
sorry i didnt explain mysel corretly, did i ? ok, it seems that the problem involves the code rom size in the options. when the code rom is : SMALL: Program 2K or less it will not complie. i need that seeting for my hardware, wel li think i do. cos it wont download unless in like that. i hope this can be resolved
It sounds like when you add that piece of code, your program becomes larger than 2K bytes and the "small" code ROM size cannot work. How big is your program without the interrupt code? If it is almost 2k, this is probably your problem. If so, you either need to trim some fat out of your code or hopefully you can figure out how to use the compact ROM size.
Well i have found out by systmatically testing, that that is not my problem now. it complies ok now in a 64k large. and my hardware likes it, untill i send a code down with the inturpts in it. it frezzes up when down loading. im am currentl using a development board from my university. any ideas?
ahhhhh, i found that my hardware has the interrupts at 0xBF00. how do i set this off set up in keil?? That is why it kept frezzin before when i tried to acess the wrong area.
place #pragma iv (0x0000) in your source code. The pragma above will force interrupts to the 0x0000 block. But, that space may already be used by monitor code... Beware. You said it's an eval board from a University - Is this something you're doing on your own or is it an assignment? It you were given an assignment to use timer0, then you must be able to use it (unless your prof isn't sharp enough to realize this). If you are winging this on your own, the problem could be that you just can't use timer0 on this eval board.
I do have acess to timer0. that was just an example, i will be needing 3 external interrupts also. i have chosse EX0, EX1, and CT3I/P1.5 But i now have a different problem, i can get the external interupts to work on the board, i did by changing the options, C51, int vectors options to 0xBF00. this made the interrupts work on the board, but when i went to simulate it, and clicked on a inturrpt the program jummped out and sat at the inturrupt vector ie IE0 jumped to 03h. why is this?
I've never used the Keil simulator, but somewhere in the options there should be a way to let it know you want to relocate where the hardware goes for interrupt vectors. Is there a place where you select what chip you are simulating? If so, maybe all you have to do is make sure the correct chip (one that has its int vectors at 0xBF00) is selected.
View all questions in Keil forum