| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
STEVE McINTYRE AUTOMOTIVE APPLICATIONS ENGINEER July 1989 Or
Top Searches for this datasheetUsing Entry Interrupt Designs STEVE McINTYRE AUTOMOTIVE APPLICATIONS ENGINEER July 1989 Order Number 270692-001 Information this document provided connection with Intel products Intel assumes liability whatsoever including infringement patent copyright sale Intel products except provided Intel's Terms Conditions Sale such products Intel retains right make changes these specifications time without notice Microcomputer Products have minor variations this specification known errata Other brands names property their respective owners Since publication documents referenced this document registration Pentium OverDrive iCOMP trademarks been issued Intel Corporation Contact your local Intel sales office your distributor obtain latest specifications before placing your product order Copies documents which have ordering number referenced this document other Intel literature obtained from Intel Corporation 7641 Prospect 60056-7641 call 1-800-879-4683 COPYRIGHT INTEL CORPORATION 1995 USING ENTRY INTERRUPT DESIGNS CONTENTS HIGH SPEED INPUTS OTHER CONSIDERATIONS CODED EXAMPLE ABOUT ROUTINE CONCLUDING COMMENTS REFERENCES PAGE AP-427 four-wheel Anti-Lock Braking (ABS) systems wheel speeds common design consideration With this high wheel speed comes problem high wheel speed detection faster detect wheel speeds faster determine wheel lock-ups wheel speed sensor generating sinusoidal waveform that converted square wave This square wave frequency 6000 range This means that number positive edges that processor needs detect about during each processing loop processing loop time calculated minimum loop time with maximum effect performance This means that processor must interrupt what doing service that high speed input interrupt (save time away that wheel) return previous state this could much time that interrupt service routine 8X96JC device been modified slightly assist designer FIFO full (IOS0 been changed meaning Instead being when FIFO almost full (6th FIFO entry seventh event) when FIFO entry (5th event) occurred There longer FIFO full since entry replaced This means that when interrupts used with FIFO (IOC0 there holding register loaded interrupt (IOC0 ``0'') entry interrupt (IOC0 ``1'') software designer take advantage this feature Instead interrupting first every event) utilize buffering events FIFO interrupt entry FIFO Leaving more slots FIFO future event storage LOST EVENTS WILL OCCUR Using this method saves over processing loop time Instead time spent interrupt service routine only spent HIGH SPEED INPUTS High Speed Inputs 8096 family product perfect detecting high speed input frequencies four-wheel designs four High Speed Inputs (HSI) used past software designer interrupt processor every time rising edge occurred each wheel speed output interrupts processing loop time worst case conditions processing loop spent interrupt service routine NOTE Using 90-100 tooth pulse wheel that generates output frequency Hz-6000 operating 8X9XBH MHz) OTHER CONSIDERATIONS wheel speeds number edges decreases making difficult detect wheel speeds Less information available entry interrupt method used instead event interrupt method software interrupt routine event interrupt (holding register full) event interrupt identical Switching between these simple matter writing control register (IOC0 When wheel speeds below 1000 detected software could switch from entry method 270692 Figure with FIFO AP-427 entry method This more information gathered quicker slow wheel speeds when processing loop time less critical This unique feature interrupt flexibility translates maximum utilization application starving power these reasons 8X96JC perfect four-wheel designs signal Figure IOPORT1 high time represents time within interrupt service routine time time between service routines worst case input frequency 6000 used only left between processing interrupt service routines much time processor complete other tasks besides interrupt routine fourth entry interrupt used same slightly similar input signals outcome greatly different Figure similar signals shown Instead apart signals closer together (about apart) This shows that about spent interrupt service routine saved processing other than interrupt service instructions information lost Eight times less interrupts handled because entire FIFO holding register utilized Also notice that processor will interrupt fifth event fourth When edges detected CODED EXAMPLE Listed this AP-NOTE acual service routine software used four-wheel speed inputs connected pins Figure shows graphic representation high speed input pins (labeled Wheel Speed Outputs) Shown worst case input pins since pass through interrupt service routine takes about This includes interrupt response time decoding bits storage ITIME FTIME values incrementing pulse counters signals high speed inputs placed about apart interrupt service routine would only have enough time exit routine just time enter again ``backto-back execution'' 270692 Figure Entry Interrupt Response Time 270692 Figure Entry Interrupt Response Time AP-427 high speed input unit event time placed FIFO (see Figure Within eight device states event will loaded into holding register (provided there room holding register full device will allow transfer into holding register) Following this technique fourth event will FIFO with third second first event will holding register Upon detection fifth event (fourth entry FIFO device will recognize event interrupt processor Three more slots FIFO free event storage Since four inputs used four-wheel worst case input signal where each input maximum frequency (6000 placement where each about apart (The resolution unit sees another transition another input within that window only entry will FIFO event bits placement just outside window events must stored Hence worst case 6000 frequency would typically around 3000 using tooth pulse wheel This makes savings better because interrupt overhead With 3000 number savings over This translates added functions within system With added memory 8X97JC device added savings such things Traction control suspension control could added easily REFERENCES Bosch Automotive Handbook Edition ``Suspensions'' ``Braking Equipment'' Isbn 0-89883518-6 Reinecke ``An Anti-Lock System with Extended Safety Control System Functions'' Vehicle Design 1985 Petersen Quicke ``New Anti-Lock Systems Commercial Vehicles Realized with Single-Chip Microcomputers'' Wabco Westinghouse GmbH Hanover IMechE Paper C205 Maisch Schramm ``Further Development Anti-Lock Braking Systems Commercial Vehicles with Compressed Brakes'' IMechE Paper C191 Klein Hans-Christof ``Anti-Lock Brake Systems Passenger Cars State 1985'' Paper 865139 Gerstenmeier Jurgen ``ABS Electronics Current Status Future Prospects'' IMechE Paper C239 ``Electronic Control Unit Passenger AntiSkid (ABS)'' IMechE Paper C186 ``Traction Control (ASR) Extension Anti-Lock Braking Systems (ABS)'' Paper 861033 Hussain Seyd ``The Application High Speed Integrated Digital Microcontrollers Modern Anti-Lock Systems'' Paper 1985 ABOUT ROUTINE interrupt routine supports frequency detection approach number positive edges detected noted well beginning ending time that first last positive edges occurred Through these (ITIME FTIME incoming frequency calculated relatively easily (FTIME ITIME) tick represents number positive edges within ITIME FTIME limits tick stands value increment timer (For example increment TIMER1 happens every tick would equal course application there other considerations such wheel rolling radius types pavement relationships other wheels These things performed periodic basis within software timer interrupt routine After wheel speed information gathered CONCLUDING COMMENTS Although saving wheel speed detection four-wheel system value this number came from some pretty aggressive wheel speed frequencies AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations (038-N) MCS-96 MACRO ASSEMBLER PAGE SOURCE FILE WHEELSPD OBJECT FILE WHEELSPD CONTROLS SPECIFIED INVOCATION COMMAND OBJECT LINE SOURCE STATEMENT $TITLE (`Program MCS96-HSI-WHEEL SPEED Calculations TITLE WHEELSPD AUTHOR Steve McIntyre PROJECT LANGUAGE iNTEL ASM96 assembler MODIFIED WHEN CHANGES MADE Steve McIntyre Initial program creation WHEEL SPEED MODULE MAIN following program uses 8X96JC entry interrupt manipulate wheel speed indicators program used measure interrupt processing time four-wheel with teeth pulse wheel (0-6000 signals inputs $eject AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT PAGE 0000 0002 0002 0003 0004 0004 0006 0006 0007 0008 0009 000A 000A 000C 000E 000E 000F 0010 0011 0011 0015 0015 0016 0016 0017 0017 0018 1FFE 1FFF LINE SOURCE STATEMENT $include (8096BH inc) 8096 INC-DEFINITION SYMBOLIC NAMES REGISTERS 8096 INTEL CORPORATION 1983 WORD ZERO REGISTER COMMAND BYTE WORD RESULT BYTE MODE TIME WORD WORD TIME BYTE COMMAND STATUS BYTE SBUF BYTE MASK BYTE BYTE PENDING WATCHDOG BYTE WATCHDOG TIMER TIMER1 WORD TIMER2 WORD BAUD RATE BYTE IOPORT0 BYTE IOPORT1 BYTE IOPORT2 BYTE BYTE BYTE STAT IOC0 BYTE IOS0 BYTE IOC1 BYTE IOS1 BYTE CONTROL BYTE IOS2 BYTE WORD IOPORT3 1ffeH word IOPORT4 1fffH byte $EJECT AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE SOURCE STATEMENT ****************** program equates ****************** 100H MASK1 PEND1 HOLDING FULL HOLDING FULL FIFO FULL FIFO ROUTINE ENABLE ENABLE ENTRY EDGES ALLOW ENTRY MASK SOFTWARE TIMER ALLOW SOFTWARE TIMER CALC TIMER TIMER MASK MASK MASK MASK MPH1 MASK MASK MASK MASK 25000 PAGE 0100 0013 0012 0007 0080 0040 0020 0055 0080 0055 0004 0001 0020 000F 09C4 0018 0000 0002 0004 0006 0001 0002 0004 0008 61A8 0000 0001 0002 0003 0004 0005 0006 0007 0010 0020 0040 0080 0080 10000000B 01000000B 00100000B 01010101B 10000000B 01010101B 00000100B 00000001B 00100000B 00001111B 2500 This magical number 3000 MAIN LOOP CONTROL $eject AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE SOURCE STATEMENT General Purpose rseg IOC0 SAVE IOS1 SAVE EVENT STATUS CALC FLAG PAGE 0080 0080 0081 0082 0083 0084 0085 0086 0087 0088 008A 008C 008E 0090 0092 0094 0096 0098 009A 009C 009E 00A0 00A2 00A4 00A8 00A9 00AA 00AB save IOC0 status save IOS1 status status reads flag determine Itime Ftime loaded number edges HSI0 number edges HSI1 number edges HSI2 number edges HSI3 time reads Initial time four HSI's EVENT TIME ITIME ITIME ITIME ITIME FTIME FTIME FTIME FTIME Final time four HSI's TIMER TEMP TEMP TEMP TEMP TEMP $eject AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE PAGE SOURCE STATEMENT Interrupt Vectors cseg cseg $eject 2004H SERVICE ROUTINE 200AH SOFTWARE TIMER 2004 2004 D620 200A 200A 5221 AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT PAGE 2080 2080 2080 2081 A1000118 2085 2085 C90000 2088 89700018 208C D9F7 208E 2092 2095 2097 2099 A1000118 B0000F 1115 1116 1109 209B 1108 209D 71AA80 20A0 C41580 20A3 281F 20A5 A00AA2 20A8 28E0 20AA 910408 20AD 912008 20B0 B15503 20B3 B10F83 20B6 11A8 20B8 918016 20BB 20BC 915580 20BF C41580 20C2 20C2 27FE LINE SOURCE STATEMENT ****************** MAIN ROUTINE ****************** cseg 2080H INITIAL START Disable Interrupts Initialize Stack pointer CLEAR PUSH Clear from CLEAR Reinitialize stack pointer IOPORT1 clear port CLRB IOC0 Disable HSI's CLRB IOC1 Disable select entry CLRB PENDING Clear previous interrupts CLRB MASK ANDB IOC0 SAVE ENABLE Disable HSI's IOC0 SAVE IOC0 SCALL EMPTY FIFO Clear FIFO Initialize TIMER TIMER1 4timer1 SCALL RESTART SOFTWARE TIMER Initialize INIT MASK ALLOW ENTRY ALLOW SOFTWARE TIMER MASK Init mask EDGES Select only MODE positive edges calc flag used determining when interrupt expired CALC FLAG CALC CLRB TEMP IOC1 ENABLE ENTRY Enable Interrupt IOC0 SAVE ENABLE Enable interrupts IOC0 SAVE IOC0 LOOP FOREVER SJMP LOOP FOREVER interrupts take over $eject AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT 901681 378108 7171F81 LINE SOURCE STATEMENT ****************** Subroutines ****************** PAGE Subroutine empty FIFO EMPTY FIFO IOS1 SAVE IOS1 SAVE ANDB IOS1 SAVE TIME SJMP EMPTY FIFO FIFO EMPTY ANDB IOS1 SAVE $eject (initialization) 20C4 20C4 20C7 20CA IOS1 Check data available HOLDING FULL FIFO EMPTY HOLDING FULL Clear FIFO entry Keep checking clear data avail 20CD A00400 20D0 27F2 20D2 20D2 71BF81 20D5 FIFO FULL Clear fifo full AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE SOURCE STATEMENT PAGE Subroutine service FIFO when data available from entry SERVICE ROUTINE PUSHF IOPORT1 used monitor time spent routine IOPORT1 FIFO ROUTINE CHECK SJMP ENTRIES IOS1 SAVE IOS1 Check IOS1 events IOS1 SAVE HOLDING FULL HOLDING FULL When more events exit EXIT ROUTINE routine 20D6 20D6 20D7 91200F 20DA 20DA 901681 20DD 3F8102 20E0 206B 20E2 20E2 717F81 20E5 B00682 20E8 A00488 20EB 20EB 20EB 308215 20EE 911083 20F1 30830A 20F4 1184 20F6 A0888A 20F9 71FE83 20FC 2005 20FE 20FE 1784 2100 A08892 2103 2103 328215 2106 912083 2109 31830A 210C 1185 210E A0888C 2111 71FD83 2114 2005 HOLDING FULL HOLDING FULL ANDB IOS1 SAVE status EVENT STATUS STATUS time EVENT TIME TIME SCAN Check activity each input activity check flags then time into FTIME increment else cleared time into ITIME TC40 CHECK EVENT STATUS CHECK MASK CALC FLAG CLRB ANDB SJMP CALC ITIME CALC CHECK FLAG PROCESS FTIME Clear pulse counter EVENT TIME Load itime with time FLAG MASK ftime flag check PROCESS FTIME INCB Increment pulse counter load ftime with time FTIME EVENT TIME CHECK CLRB ANDB SJMP EVENT STATUS CALC FLAG MASK CHECK CALC FLAG PROCESS FTIME ITIME EVENT TIME CALC FLAG MASK CHECK AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT 2116 2116 1785 2118 A08894 211B 211B 348215 211E 914083 2121 32830A LINE SOURCE STATEMENT PAGE PROCESS FTIME INCBTC FTIME EVENT TIME CHECK EVENT STATUS CHECK CALC FLAG MASK CALC FLAG PROCESS FTIME AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT 2124 1186 2126 A0888E 2129 71FB83 212C 2005 212E 212E 1786 2130 A08896 2133 2133 368215 2136 918083 2139 213C 213E 2141 2144 33830A 1187 A08890 71F783 2005 LINE CLRB ANDB SJMP PAGE SOURCE STATEMENT ITIME EVENT TIME MASK CALC FLAG CHECK PROCESS FTIME INCB FTIME CHECK CLRB ANDB SJMP EVENT TIME EVENT STATUS MASK CALC FLAG SCAN COMPLETE CALC FLAG PROCESS FTIME ITIME EVENT TIME MASK CALC FLAG SCAN COMPLETE 2146 2146 1787 2148 A08898 214B 214B 278D PROCESS FTIME INCB FTIME EVENT TIME SCAN COMPLETE SJMP CHECK ENTRIES Continue until more events 214D 214D 71DF0F 2150 2151 EXIT ROUTINE ANDB IOPORT1 POPF $eject FIFO ROUTINE clear AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE SOURCE STATEMENT PAGE Subroutine handle software timer interrupts (every 2152 2152 2153 B10408 2156 2157 95800F 215A 901681 215D 308128 2160 71FE81 2163 2825 2165 2165 348305 2168 2169 910183 216C 216D 216D 358305 2170 2171 2174 2175 2175 2178 910283 368305 2179 910483 217C 217D 217D 378305 SOFTWARE TIMER PUSHF Push mask Stack MASK ALLOW ENTRY Allow interrupts during software timer XORB IOPORT1 MAIN LOOP CONTROL Toggle status bits IOS1 SAVE IOS1 IOS1 SAVE EXIT SOFTWARE TIMER Check ANDB IOS1 SAVE MASK SOFTWARE TIMER Clear SCALL RESTART SOFTWARE TIMER Restart Software Timer wheel speed calculations Each input calculated wheel speed CALC check edges CALC FLAG CALC don't allow interrupts during info gathering CALC FLAG MASK Clear flag next will ITIME ReENABLE interrupts same calculation each input CALC CALC FLAG CALC CALC FLAG MASK CALC CALC FLAG CALC CALC FLAG MASK CALC CALC NONE CALC FLAG AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT 2180 PAGE 2181 910883 2184 2185 2185 B10F83 LINE SOURCE STATEMENT CALC FLAG MASK CALC NONE CALC CALC FLAG EXIT SOFTWARE TIMER POPF restore Return from timer $eject Tell routine time Itime 2188 2188 2188 AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations OBJECT LINE SOURCE STATEMENT PAGE Subroutine restart software timer 218A RESTART SOFTWARE TIMER 218A 65C409A2 TIMER TIMER timer value TIMER Load command 218E B11806 COMMAND 2191 A0A204 TIME TIMER time trigger interrupt 2194 return 2195 AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations SYMBOL TABLE LISTING NAME COMMAND RESULT CALC ALLOW ENTRY ALLOW SOFTWARE TIMER BAUD RATE CALC CALC CALC CALC CALC NONE CHECK CHECK CHECK CHECK CHECK ENTRIES CLEAR EMPTY FIFO ENABLE ENTRY ENABLE EVENT TIME EXIT ROUTINE EXIT SOFTWARE TIMER FIFO EMPTY FTIME FTIME FTIME FTIME HOLDING FULL HOLDING FULL EVENT STATUS FIFO FULL FIFO ROUTINE HOLDING FULL MODE EDGES SERVICE ROUTINE STATUS TIME COMMAND TIME VALUE 0002H 0002H 000FH 0004H 0020H 000EH 0000H 0001H 0002H 0003H 0004H 0005H 0006H 0007H 2165H 216DH 2175H 217DH 2185H 0000H 0002H 0004H 0006H 20EBH 2103H 211BH 2133H 20DAH 2085H 20C4H 0080H 0055H 0088H 214DH 2188H 20D2H 0092H 0094H 0096H 0098H 20E2H 0007H 0082H 0040H 0020H 0080H 0003H 0055H 20D6H 0006H 0004H 0006H 0004H ATTRIBUTES NULL BYTE NULL WORD NULL NULL NULL NULL BYTE NULL NULL NULL NULL NULL NULL NULL NULL CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY NULL NULL NULL NULL CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY NULL NULL WORD CODE ENTRY CODE ENTRY CODE ENTRY WORD WORD WORD WORD CODE ENTRY NULL BYTE NULL NULL NULL NULL BYTE NULL CODE ENTRY NULL BYTE NULL WORD NULL BYTE NULL WORD PAGE AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations NAME VALUE ATTRIBUTES CODE ENTRY NULL BYTE NULL NULL NULL BYTE NULL BYTE BYTE NULL BYTE NULL BYTE NULL BYTE NULL BYTE NULL WORD NULL BYTE NULL BYTE NULL BYTE BYTE NULL BYTE WORD WORD WORD WORD CODE ENTRY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL WORD WORD WORD WORD NULL BYTE CODE ENTRY CODE ENTRY CODE ENTRY CODE ENTRY NULL BYTE NULL WORD CODE ENTRY NULL BYTE CODE ENTRY CODE ENTRY CODE ENTRY NULL WORD NULL BYTE NULL BYTE NULL WORD NULL NULL PAGE INITIAL START 2080H 0008H MASK MASK1 0013H 0012H PEND1 PENDING 0009H IOC0 0015H 0080H IOC0 SAVE IOC1 0016H IOPORT0 000EH IOPORT1 000FH IOPORT2 0010H IOPORT3 1FFEH IOPORT4 1FFFH IOS0 0015H IOS1 0016H IOS1 SAVE 0081H IOS2 0017H ITIME 008AH 008CH ITIME 008EH ITIME ITIME 0090H 20C2H LOOP FOREVER 0080H MAIN LOOP CONTROL MASK 0010H 0020H MASK MASK 0040H 0080H MASK 0001H MASK MASK 0002H 0004H MASK 0008H MASK MASK SOFTWARE TIMER 0001H 009AH 009CH 009EH 00A0H MPH1 61A8H CALC FLAG 0083H 20FEH PROCESS FTIME PROCESS FTIME 2116H 212EH PROCESS FTIME 2146H PROCESS FTIME CONTROL 0017H 0000H RESTART SOFTWARE TIMER 218AH SBUF 0007H 214BH SCAN COMPLETE SCAN 20EBH 2152H SOFTWARE TIMER 0018H 0011H 0011H STAT 0100H TIMER 00A2H 0018H TIMER TIMER 09C4H AP-427 MCS-96 MACRO ASSEMBLER Program MCS96-HSI-WHEEL SPEED Calculations NAME VALUE ATTRIBUTES PAGE TEMP TEMP TEMP TEMP TEMP TIMER1 TIMER2 WATCHDOG WHEEL SPEED 0084H 0085H 0086H 0087H 00A4H 00A8H 00A9H 00AAH 00ABH 000AH 000CH 000AH BYTE BYTE BYTE BYTE LONG BYTE BYTE BYTE BYTE NULL WORD NULL WORD NULL BYTE MODULE MAIN STACKSIZE(0) ASSEMBLY COMPLETED ERROR(S) FOUND Other recent searchesZRCC3333 - ZRCC3333 ZRCC3333 Datasheet ZRCS3333 - ZRCS3333 ZRCS3333 Datasheet ZRCX3333 - ZRCX3333 ZRCX3333 Datasheet TPA3003D2 - TPA3003D2 TPA3003D2 Datasheet TLV5613 - TLV5613 TLV5613 Datasheet SW-800 - SW-800 SW-800 Datasheet SN74AHC126 - SN74AHC126 SN74AHC126 Datasheet SN54AHC126 - SN54AHC126 SN54AHC126 Datasheet SMBTA56 - SMBTA56 SMBTA56 Datasheet SMBTA06 - SMBTA06 SMBTA06 Datasheet pASIC380 - pASIC380 pASIC380 Datasheet NTE7158 - NTE7158 NTE7158 Datasheet
Privacy Policy | Disclaimer |