MEGAsquirt A place to collectively sort out this megasquirt gizmo

What is port a port b & port c in MLV?

Thread Tools
 
Search this Thread
 
Old 07-14-2008, 01:59 PM
  #1  
Junior Member
Thread Starter
 
StarGehzer's Avatar
 
Join Date: Jan 2008
Location: Toronto, Ontario, Canada
Posts: 74
Total Cats: -4
Default What is port a port b & port c in MLV?

What is port a port b & port c in MLV's graphs ?
StarGehzer is offline  
Old 07-14-2008, 03:05 PM
  #2  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,023
Total Cats: 6,591
Default

They're data registers inside the CPU chip itself. Useful for people modifying and debugging the assembly code, not of much value for the average user. At a technical level, they represent the states of the various general-purpose I/O pins on the CPU, and are expressed in the logs as binary-coded-decimal. By decoding the numerical values into raw binary, one can determine whether any particular output pin on the CPU is on or off, or whether an input pin is high or low, at any moment in time.

By looking at the datasheet for the M68HC908GP32 microprocessor, you can see that all of the I/O pins are organized into groups of 8, with each group being a port. Each port has a one byte register, with each bit representing one pin. To turn a pin on or off, you write a 1 or 0 into whichever bit of that register corresponds to the pin you want to control.

For example, the idle valve is connected to pin 34 of the CPU, which is PTA1 (port A, bit 1). So when MS wants the idle valve open, it shifts a logic 1 into the second bit position of port A (remember, they're numbered 0-7).

Last edited by Joe Perez; 07-14-2008 at 04:00 PM. Reason: Oops- that's "shifts a logic 1", not "shits a logic 1".
Joe Perez is offline  
Old 07-14-2008, 03:45 PM
  #3  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

now that this is answered....what's "bit 7: Y/N" and "bit 8: Y/N"
Braineack is offline  
Old 07-14-2008, 03:59 PM
  #4  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,023
Total Cats: 6,591
Default

According to the notes in source code, bit 7 is the !sync indicator in the tooth_decode2 subroutine. If sync is lost, then that bit goes true.

Bit 8 is a little more vague. It appears to be related to the !operational status of the TargetAFR routine, however I can't quite determine the exact logic of how it's set.
Joe Perez is offline  
Old 07-14-2008, 05:08 PM
  #5  
Junior Member
Thread Starter
 
StarGehzer's Avatar
 
Join Date: Jan 2008
Location: Toronto, Ontario, Canada
Posts: 74
Total Cats: -4
Default

Thanks.
That is an answer & 1/2!
StarGehzer is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
FAB
Prefabbed Turbo Kits
216
03-22-2017 04:00 PM
Corky Bell
Prefabbed Turbo Kits
18
11-22-2016 09:01 PM
stoves
Suspension, Brakes, Drivetrain
5
04-21-2016 03:00 PM
StratoBlue1109
Miata parts for sale/trade
7
09-24-2015 03:50 PM
Sirnixalot
Engine Performance
3
09-20-2015 09:45 PM



Quick Reply: What is port a port b & port c in MLV?



All times are GMT -4. The time now is 07:11 PM.