pgmfi.org

Hacking up Honda's ECU
It is currently Tue Apr 16, 2024 1:36 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jan 19, 2006 3:10 pm 
Offline

Joined: Sat Oct 15, 2005 1:07 pm
Posts: 43
Im in the process of rewriting the stock ECU code to work with my wideband, and in the process, Im hacking through a lot of the main fuel control code.

Can anyone tell me what happens when you set one of the Master Interrupt Priority Flags? Does this call an interrupt of some sort? The docs state that bit 8 is master interrupt priority, and bits 4,5,9 are user MIP flags. I see the statement

SB PSWL.4

a lot in code, and Im wondering what this actually does. Obviously it sets some interrupt state or actually calls an interrupt?

Thanks in advance.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 04, 2006 2:09 pm 
Offline

Joined: Tue Jul 27, 2004 3:01 am
Posts: 2945
Location: Tampa bay, Florida
I don't fully understand but maybe this helps:

I think if you set MIP=1 then it enables the higher interrupts to take priority over lower interrupts, whereas with it disabled, all interrupts are treated with the same priority.

A hypothetical example: if you're handing something like an interrupt for the injector pulse, you might want that to have priority over an interrupt for the serial routines, so you would enable (Set MIP)=1. when you're done with your injector pulse routines, you can pass control back to the other interrupts by disabling( Reset MIP)=0, allowing the other events to hook.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 05, 2006 4:25 pm 
Offline

Joined: Tue Jul 27, 2004 2:21 am
Posts: 268
Location: Milwaukee, WI
PSWL.4 and .5 are indeed user flags, and the code uses them basically to pass around boolean parameters - the microcontroller doesn't do anything with those flags, so they act like extra one-bit RAM locations. They're not "MIP" flags of any sort, though, but I remember seeing some ridiculous wording like that in the 66k docs.

however, I'm way too out of touch with that stuff to give you any constructive advice about the interrupt priority stuff. Generally the code messes with the IE register to enable/disable interrupts, typically at the beginning and end of each interrupt service routine, and along with that I can see the code also does a RB PSWH.0 and SB PSWH.0 (which would be bit 8 of the PSW). I've never really noticed that before.

Anyway I'd leave it alone. :)


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 07, 2007 12:29 pm 
cobra2326 wrote:
Im in the process of rewriting the stock ECU code to work with my wideband, and in the process, Im hacking through a lot of the main fuel control code.

Can anyone tell me what happens when you set one of the Master Interrupt Priority Flags? Does this call an interrupt of some sort? The docs state that bit 8 is master interrupt priority, and bits 4,5,9 are user MIP flags. I see the statement

SB PSWL.4

a lot in code, and Im wondering what this actually does. Obviously it sets some interrupt state or actually calls an interrupt?

Thanks in advance.


by the name of it, i would say this interrupt has priority over all other processes. the question is, is what causes the interrupt? is it a timer, an external input such as a high or low voltage, other?

also, you will need to know what to name your function so when the interrupt occurs, it has something to do even if it is nothing.

does anyone have the datasheet to the ucontroller?


Top
  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 08, 2007 8:07 am 
Offline

Joined: Tue Jul 27, 2004 3:01 am
Posts: 2945
Location: Tampa bay, Florida
..


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group