: MC68HC908JL3

: MC68HC908JL3

: MC68HC908JL3

: ..

. 9-454

: ..

2003


1.

2.

2.1

3.

3.1

3.2 -

4.

4.1

4.2

4.2.1 .

4.2.2

4.2.3

4.2.4

4.2.5

4.2.6 BCD

5.


.

, , .

, , . , , .

, , .

, .. , .

, , , , .

, : . . , , .


1.

.

:

1.  :

. / : 0 250 ...

. : 0 133 . .

2.  : 1.5 ...

3.  :

. : 3 ...

. : 5% .

4. : -.

16- , 2- -.

.


2.

, , . , - DV-16210NRB/R, , 16 .

, :

1.  , 0,3V, 4,8V, .

2.  ( ).

3.  30 50 , / 0 250 ...

3- MOTOROLA MPX5050DP.

2.1

:

1.  - 13, .. 11 , .

2.  , MPX5050DP .

, , , MOTOROLA MC68HC908JL3.


3. 

3.1

.3.1.1.

. , (), , .. , . , , .

, , .. .

, 1, 0.04. , , 1, (0,04). 2- .

, ( ) , . , , , .

, , . , . , , , , . .

, , . , , , , .

.3.1.2.. ( .3.1.2.. ), t1 . , t1 , .

, .3.1.2.. , . , . ( ). .3.1.2. .3.1.2. .

.3.1.2. , , .


.

MCU

 

 

 


11


.3.1.1.

.3.1.2.

3.2 -

HC08 MOTOROLA , . , . -, , .. -.

.5.1. , 13 -(11 - ).

MC68HC908JL3, 22 -. , , 9- -, . , , , , , . , -.


4.

4.1

, , .4.1.2. . , . 0,75 , , , . 3 4.

1,75V, . , 450 S, - . 5 . , 6.

.4.1.1., , 2- , 1 2. , 4.2.


.

 :


2

 :


1


.4.1.1.

, , . , , , , .. , . , , , , , , .



2.

 


Y N


Y N


Y N


N Y


Y

.4.1.2. .


4.2

4.2.1

.4.2.1.2.. , 1, -, . 2 , . , , ( 4), 0.

, CONST, . .4.2.1.1., : 0. , .


0

.4.2.1.1. .

. del 0,75 ( .12). 16 15 , , (. 17 21). del. del0 , .13. . del=0, .25. . , .12. . , , , .

, 30 ( 1) (1,75V). , . , 5 , . Upress1>, OVSEC, (. 33 37).

, , , SEC10 SEC (. 38). 2 (. 39). 0 (. 40), UDAV ( ), 1. 1, PULSE, - , . .

:

,

, AMP1 AMP2 ;

time .

SB=0 (.50), time1 (.52 55). (.56), 2, 1, (.57 59) .29, .. . 1, 2, , .

SB=1, , :

1.  =0, time2, time2 time1, 1 (.64 66).

2.  =1, time1, time1 time2, 0 (.61 63).

, , time3 (.67).

68 2 1. 69 73 . .

.4.2.1.1. , , 1 , .. . , 1, 2 . 2, . , (.75). , SIS, QB 1 (.77,78), . , QB , .

(.76), DIA (.79). (.80), SIS=0, , (.81), . SIS0, (.82 84) (.85), .

QB , , , .

1.INIT

 


7.UpressConst

 

8.

 


.4.2.1.2.





-: : del=0


.4.2.1.2.()


26.Acmp1

 

24.UpressA

 



-: : 30.Upress1>

32.

 




-: : 37.A>cmpad


.4.2.1.2.()



-: : Amp2>Amp1


-: : Sb=0


-: : Pb=0

53. H:X

 


63. Pb

 

66. Pb 1

 
-: : Cb=1


.4.2.1.2.()



-: : 74.Qb=1


-: : 75.A>1

-: : 76.A>2



-: : 80.Sis=0


.4.2.1.2.()



-: : Coco1=1


.4.2.1.2.()

4.2.2

, .4.2.2.1. , 125, .. Fbus/8, 12499. 0,1 S .

TOF(.1), .

, , 2, Sec10( 10- ). Sec10 9- (.3), , .. , Sec10 (.4) Sec ( ).

6,7 2- , Dvb(.8), (.30,31,29) . .4.2.1.2.



.4.2.2.1.

4.2.3

.4.2.3.1.

ab (.1) , 0, 1. 0, .. ab=0.

2 , 0:

1.  (ab2=0), ab1, , , , 1. ab2 1 (.4), 0 (.7). .

2.  (ab2=1), 5 1, , , Upress, 0 (.7). .

1 (ab=1), .

ab2 ab1 . , 0, 1, , 1. , ab2 ab1.

3. Ab1

 

5.. 1 1

 

9. Ab2

 

11.. 1

 

4.. Ab2 1

 

6.ADRUpress

 

10.. Ab1 1

 

12.ADRUpress1

 

: 7.  (0)

RTI

 


.4.2.3.1.

4.2.4 .

. 4.2.4.1.

CPU (.1). (.2), Udav (.3). 4 , ( .5), TCP . , 6, Udav, 7 CPU, .

1. CPU

 

2.Udav - CONST

 

3..Udav

 

4.UdavX

 

5.LDA TCP,X

 

6.ADav

 

RTS

 


.4.2.4.1.


4.2.5

.4.2.5.1.

ci (.2) - .

5 , . .6 , TCI . , BCDxxx.

8,9 INDxxx, 10 INDxxx.

11 , 12 , 13-15. 30 , , .

, .17,18 , (.19), 20-22. 23 , ci, 25-27 , .28 , ci 0, .6 . ci=0, .



.4.2.5.1.



.4.2.5.1.()

4.2.6 BCD

BCD .4.2.6.1.

, CPU . 1 :

1.  99, 3 100, , , H. , BCD100 (.4), (.5), 10 (.6). , , BCD10 (.7), BCD1 (.8).

2.  99, 2, 9, BCD100,BCD10 (. 11,12), BCD1 (.13). 9, (.9), BCD100 , 10 (.6) 1, 6.

3. 


.4.2.6.1.


5.

.5.1.


, . , . . .

, - , , .

CASM08, ICS08JL, .


1.  .. MOTOROLA. . . 2000. 96 .

2.  . DATA INTERNATIONAL. . 1999. 64 .

3.  Technical Data. MC68HC908JL3.

4.  Technical Data. MPX5050DP.


.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 1

0000 1 PTA equ $0

0000 2 PTB equ $1

0000 3 PTD equ $3

0000 4 DDRA equ $4

0000 5 DDRB equ $5

0000 6 DDRD equ $7

0000 7 PDCR equ $A

0000 8 PTAPUE equ $D

0000 9 KBSCR equ $1A

0000 10 KBIER equ $1B

0000 11 CONFIG2 equ $1E

0000 12 CONFIG1 equ $1F

0000 13 TSC equ $20

0000 14 TCNTH equ $21

0000 15 TCNTL equ $22

0000 16 TMODH equ $23

0000 17 TMODL equ $24

0000 18 ADSCR equ $3C

0000 19 ADR equ $3D

0000 20 ADICLK equ $3E

21

22

23

0080 24 org $80 ;

25

0080 26 ind rmb 3

0083 01 27 adres db 1

0084 01 28 BCD100 db 1

0085 01 29 BCD10 db 1

0086 01 30 BCD1 db 1

0087 01 31 indx db 1

0088 01 32 ci db 1

0089 01 33 bitf db 1

008A 01 34 upress1 db 1

008B 01 35 upress db 1

008C 01 36 udav db 1

008D 01 37 const db 1

008E 01 38 dav db 1

008F 01 39 y db 1

0090 01 40 pulse db 1

0091 01 41 bitf1 db 1

0092 01 42 cmp1 db 1

0093 01 43 del db 1

0094 01 44 por db 1

0095 01 45 ovsec db 1

0096 01 46 cmpad db 1

0097 01 47 amp2 db 1

0098 01 48 amp1 db 1

0099 01 49 sec db 1

009A 01 50 sec10 db 1

009B 01 51 time1 db 1

009C 01 52 time2 db 1

009D 01 53 time3 db 1

009E 01 54 pr1 db 1

009F 01 55 sis db 1

00A0 01 56 pr2 db 1

00A1 01 57 dia db 1

00A2 01 58 pul db 1

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 2

00A3 01 59 bcdx db 1

00A4 01 60 pmem1 db 1

61

EC00 62 org $ec00 ;

63

64 start:

65 ;--------------------------- -----

66

EC00 [01] 4F 67 clra

EC01 [01] 5F 68 clrx

69

EC02 [04] 6EFF07 70 mov #$ff,DDRD ;

PTD

EC05 [04] 6E1C05 71 mov #$1c,DDRB ;

2,3,4

72

73 ;

74

EC08 [04] 1501 75 bclr 2,PTB

EC0A [04] 1701 76 bclr 3,PTB

EC0C [04] 6E0603 77 mov #$6,PTD ;

EC0F [04] 1801 78 bset 4,PTB ;

EC11 [01] 9D 79 nop

EC12 [01] 9D 80 nop

EC13 [01] 9D 81 nop

EC14 [01] 9D 82 nop

EC15 [01] 9D 83 nop

EC16 [04] 1901 84 bclr 4,PTB

EC18 [05] CDEF08 85 jsr deleysret

EC1B [04] 6E3803 86 mov #$38,PTD ;

EC1E [04] 1801 87 bset 4,PTB ;

EC20 [01] 9D 88 nop

EC21 [01] 9D 89 nop

EC22 [01] 9D 90 nop

EC23 [01] 9D 91 nop

EC24 [01] 9D 92 nop

EC25 [04] 1901 93 bclr 4,PTB

EC27 [05] CDEF08 94 jsr deleysret ; 30

EC2A [04] 6E0803 95 mov #$8,PTD

EC2D [04] 1801 96 bset 4,PTB ;

EC2F [01] 9D 97 nop

EC30 [01] 9D 98 nop

EC31 [01] 9D 99 nop

EC32 [01] 9D 100 nop

EC33 [01] 9D 101 nop

EC34 [04] 1901 102 bclr 4,PTB

EC36 [05] CDEF08 103 jsr deleysret ; 30

104

105 ;---------------------------------------------

106

107 main:

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 3

EC39 [02] A628 108 lda #!40

EC3B [02] AE80 109 ldx #$80

110 sbm:

EC3D [02] 7F 111 clr ,X ;

EC3E [01] 5C 112 incx

EC3F [01] 4A 113 deca

EC40 [03] 26FB 114 bne sbm

EC42 [04] 6E5994 115 mov #!89,por

EC45 [04] 6E089E 116 mov #!8,pr1 ;

EC48 [04] 6E0DA0 117 mov #!13,pr2;

118

EC4B [02] 9A 119 cli ;

120

EC4C [04] 6E403C 121 mov #$40,ADSCR ; 0

EC4F [05] 0789FD 122 brclr 3,bitf,$

EC52 [04] 1789 123 bclr 3,bitf

EC54 [05] 4E8B8D 124 mov upress,const

125

126 ;--------------------------- ,,

127

EC57 [04] 6E0B84 128 mov #!11,bcd100 ;$34 - "C"

EC5A [04] 6E0C85 129 mov #!12,bcd10

EC5D [04] 6E0B86 130 mov #!11,bcd1

EC60 [04] 6E0083 131 mov #$0,adres

EC63 [05] CDEEC1 132 jsr IND_RET ;

EC66 [04] 6E0D84 133 mov #!13,bcd100 ; ""

EC69 [04] 6E0C85 134 mov #!12,bcd10

EC6C [04] 6E0E86 135 mov #!14,bcd1

EC6F [04] 6E4083 136 mov #$40,adres

EC72 [05] CDEEC1 137 jsr IND_RET

EC75 [04] 6E0F84 138 mov #!15,bcd100 ; ""

EC78 [04] 6E1085 139 mov #!16,bcd10

EC7B [04] 6E1186 140 mov #!17,bcd1

EC7E [04] 6E4983 141 mov #$49,adres

EC81 [05] CDEEC1 142 jsr IND_RET

143

144 ;----------------------------------------------

145

146

147 ;---------- 0 ------------------------------;

148

EC84 [04] 6E0A84 149 mov #$a,bcd100 ;

EC87 [04] 6E0A85 150 mov #$a,bcd10

EC8A [04] 6E0386 151 mov #$03,bcd1 ; "0"

EC8D [04] 6E4683 152 mov #$46,adres ;

EC90 [05] CDEEC1 153 jsr IND_RET

EC93 [04] 1501 154 bclr 2,PTB

EC95 [04] 1701 155 bclr 3,PTB

EC97 [04] 6E0C03 156 mov #$c,PTD ;

157


.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 4

158

159 ;-------------------------------------------------

160

EC9A [05] 4E8B92 161 mov upress,cmp1

162

163 ;- --

164

165 ;- 0.7 --------

166

167 loop:

EC9D [04] 6E0093 168 mov #$0,del

169 loop2:

ECA0 [01] 4F 170 clra

ECA1 [04] C7FFFF 171 sta $ffff ; WDOG

172 loop1:

ECA4 [01] 4A 173 deca

ECA5 [03] 26FD 174 bne loop1 ; =0

loop1

ECA7 [05] 4E8B8C 175 mov upress,udav ; udav

ECAA [03] 450000 176 ldhx #$0

ECAD [05] CDEE74 177 jsr VOLTS_PRESSURE_RET ;

ECB0 [05] 4E8E8F 178 mov dav,y

ECB3 [05] CDEE85 179 jsr BCD_RET

ECB6 [04] 6E0483 180 mov #$04,adres ;

ECB9 [05] CDEEC1 181 jsr IND_RET

ECBC [04] 3A93 182 dec del

ECBE [03] 26E0 183 bne loop2 ; del=0 loop2

ECC0 [05] 069104 184 brset 3,bitf1,lop ; 3 =0

ECC3 [04] 1691 185 bset 3,bitf1 ; 3 1

ECC5 [03] 20D6 186 bra loop ; loop

187 lop:

ECC7 [04] 1789 188 bclr 3,bitf ; 3 1

189

190 ;-------------------------------------------------

ECC9 [04] C7FFFF 191 sta $ffff

ECCC [03] B68B 192 lda upress ; upress

ECCE [03] B192 193 cmp cmp1 ; cmp1

ECD0 [03] 2502 194 blo ampmet ; >cmp1,

ECD2 [03] 20C9 195 bra loop ; loop

196

197 ;------- -------------------

198

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 5

199 ampmet:

ECD4 [04] C7FFFF 200 sta $ffff

ECD7 [04] 1089 201 bset 0,bitf ; 1

ECD9 [04] 6E3023 202 mov #$30,TMODH ;

, 12499

ECDC [04] 6ED324 203 mov #$d3,TMODL ; 125000

ECDF [04] 6E4320 204 mov #$43,TSC ;

205 dvbm:

ECE2 [04] C7FFFF 206 sta $ffff

ECE5 [05] 0A8902 207 brset 5,bitf,rm ; 5

ECE8 [03] 2003 208 bra m55 ;

209 rm:

ECEA [03] CCEDFC 210 jmp rorm

211 m55:

ECED [03] B68A 212 lda upress1

ECEF [03] B194 213 cmp por ; upress1 c por

ECF1 [03] 25EF 214 blo dvbm ; upress1<por dvbm

ECF3 [03] 3F95 215 clr ovsec ; OVsec

ECF5 [05] 4E8A96 216 mov upress1,cmpad ;-----------------------------

217 loopamp:

ECF8 [04] C7FFFF 218 sta $ffff ;-----------------

ECFB [04] 1989 219 bclr 4,bitf ;-----------------

ECFD [05] 0989FD 220 brclr 4,bitf,$ ;

ED00 [03] B68A 221 lda upress1 ;-----------------

ED02 [03] B196 222 cmp cmpad ;-----------------

ED04 [03] 22F2 223 bhi loopamp ; upress1>cmpad

loopamp

224

225 ;---------- -----------

226

ED06 [04] 1A20 227 bset 5,TSC

ED08 [04] 1820 228 bset 4,TSC

ED0A [04] 6E4320 229 mov #$43,TSC

230

231 ;-------------------------------------------------

232

ED0D [05] 4E9697 233 mov cmpad,amp2 ; amp2

ED10 [04] 1189 234 bclr 0,bitf ;젠 0

ED12 [04] 1789 235 bclr 3,bitf ; 1

ED14 [05] 0789FD 236 brclr 3,bitf,$ ; 1=0

ED17 [05] 4E8B8C 237 mov upress,udav ;

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 6

udav

ED1A [04] 1089 238 bset 0,bitf ;

1

ED1C [04] 3C90 239 inc pulse ; pulse -

ED1E [03] B697 240 lda amp2

ED20 [03] B198 241 cmp amp1

ED22 [03] 220B 242 bhi proim ; amp2>amp1

proim

ED24 [05] 4E98A4 243 mov amp1,pmem1 ;-----------------

ED27 [05] 4E9798 244 mov amp2,amp1 ;

amp2 amp1

ED2A [05] 4EA497 245 mov pmem1,amp2 ;-----------------

ED2D [04] 1E89 246 bset 7,bitf ; 1

cb

247

248 ;--- --

249 proim:

ED2F [04] C7FFFF 250 sta $ffff

ED32 [05] 00913E 251 brset 0,bitf1,mtime ;

2- mtime

ED35 [04] 1091 252 bset 0,bitf1 ; sb 1

ED37 [03] BE99 253 ldx sec

ED39 [02] A60A 254 lda #!10

ED3B [05] 42 255 mul ; sec 10

ED3C [01] 8C 256 clrh

ED3D [01] 5F 257 clrx

ED3E [03] BB9A 258 add sec10 ;

sec10,

259 ;

ED40 [03] B79B 260 sta time1 ;

time1

261 cbm:

ED42 [05] 0F8908 262 brclr 7,bitf,perem ; amp2 amp1

ED45 [04] 1F89 263 bclr 7,bitf ;

ED47 [05] 4E97A4 264 mov amp2,pmem1 ;-------------------

ED4A [05] 4E9897 265 mov amp1,amp2 ;-------------------

266 perem:

ED4D [05] 4E9798 267 mov amp2,amp1 ;amp2 amp1

268

269 ;- 0.3 ---------------------;

270

271

ED50 [04] 6E0093 272 mov #$0,del

273 loop20:

ED53 [01] 4F 274 clra

ED54 [04] C7FFFF 275 sta $ffff ; WDOG

276 loop11:

ED57 [01] 4A 277 deca

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 7

ED58 [03] 26FD 278 bne loop11

ED5A [05] 4E8B8C 279 mov upress,udav

ED5D [03] 450000 280 ldhx #$0

ED60 [05] CDEE74 281 jsr VOLTS_PRESSURE_RET;

ED63 [05] 4E8E8F 282 mov dav,y

ED66 [05] CDEE85 283 jsr BCD_RET

ED69 [04] 6E0483 284 mov #$04,adres ;

ED6C [05] CDEEC1 285 jsr IND_RET

ED6F [04] 3A93 286 dec del

ED71 [03] 26E0 287 bne loop20

288

289

290

291  ;---------------------------------------------

292 

293 mtime:

ED73 [04] C7FFFF 294 sta $ffff

ED76 [03] BE99 295 ldx sec

ED78 [02] A60A 296 lda #!10

ED7A [05] 42 297 mul ;sec 10

ED7B [03] BB9A 298 add sec10 ;sec10+

ED7D [05] 039108 299 brclr 1,bitf1,time2m ; pb=0

time2m

ED80 [03] B79B 300 sta time1 ;

time1

ED82 [03] B09C 301 sub time2 ;

time1,time2

ED84 [04] 1391 302 bclr 1,bitf1 ; pb

ED86 [03] 2006 303 bra raznom

304 time2m:

ED88 [03] B79C 305 sta time2 ;

time2

ED8A [03] B09B 306 sub time1 ;

time2,time1

ED8C [04] 1291 307 bset 1,bitf1 ; pb

308 raznom:

ED8E [03] B79D 309 sta time3 ;

Time3

ED90 [03] B697 310 lda amp2 ;-------------------

------

ED92 [03] B098 311 sub amp1 ; .

ED94 [02] AE0A 312 ldx #!10 ;

10

ED96 [05] 42 313 mul ;-------------------

-------------

ED97 [03] BFA4 314 stx pmem1

ED99 [04] 55A4 315 ldhx pmem1

ED9B [03] BE9D 316 ldx time3

ED9D [07] 52 317 div ; 10 time3

318 ;

319

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 8

320 ;---------------------

----------------------------------;

321

ED9E [05] 049109 322 brset 2,bitf1,pr2m ; qb=1

pr2m

EDA1 [03] B19E 323 cmp pr1 ;pr1 -

EDA3 [03] 2505 324 blo pr2m ;

pr1 pr2m

EDA5 [05] 4E8C9F 325 mov udav,sis ;

sis

EDA8 [04] 1489 326 bset 2,bitf ; qb

1

327 pr2m:

EDAA [04] C7FFFF 328 sta $ffff

EDAD [03] B1A0 329 cmp pr2 ;pr2 -

EDAF [03] 2591 330 blo cbm ;

pr2 cbm

EDB1 [05] 4E8CA1 331 mov udav,dia ;

dia

EDB4 [02] A600 332 lda #!0

EDB6 [03] B19F 333 cmp sis

EDB8 [03] 2342 334 bls rorm ; sis=<0

rorm

EDBA [02] A63C 335 lda #!60 ;

EDBC [03] BE99 336 ldx sec ;-----------------

EDBE [07] 52 337 div ;-----------------

EDBF [03] BE90 338 ldx pulse ;-----------------

EDC1 [05] 42 339 mul ;-----------------

EDC2 [03] B7A2 340 sta pul ;-----------------

341

342 ;---------------------

-----------------------------------;

343

EDC4 [04] C7FFFF 344 sta $ffff

EDC7 [05] 4E9F8C 345 mov sis,udav ;

EDCA [05] CDEE74 346 jsr VOLTS_PRESSURE_RET ;

EDCD [05] 4E8E8F 347 mov dav,y

EDD0 [05] CDEE85 348 jsr BCD_RET

EDD3 [04] 6E0483 349 mov #$04,adres ;

EDD6 [05] CDEEC1 350 jsr IND_RET

351

EDD9 [05] 4EA18C 352 mov dia,udav ;

EDDC [05] CDEE74 353 jsr VOLTS_PRESSURE_RET ;

EDDF [05] 4E8E8F 354 mov dav,y

EDE2 [05] CDEE85 355 jsr BCD_RET

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 9

EDE5 [04] 6E4483 356 mov #$44,adres ;

EDE8 [05] CDEEC1 357 jsr IND_RET

358

EDEB [04] C7FFFF 359 sta $ffff

EDEE [05] 4EA28F 360 mov pul,y ;

EDF1 [05] CDEE85 361 jsr BCD_RET

EDF4 [04] 6E4D83 362 mov #$4d,adres ;

EDF7 [05] CDEEC1 363 jsr IND_RET

EDFA [03] 2022 364 bra exitdav

365 rorm:

EDFC [04] 1501 366 bclr 2,PTB

EDFE [04] 1701 367 bclr 3,PTB

EE00 [04] 6E0103 368 mov #$1,PTD ;ࠠ

EE03 [04] 6E1284 369 mov #!18,bcd100 ; "O"

EE06 [04] 6E1385 370 mov #!19,bcd10 ; ""

EE09 [04] 6E0C86 371 mov #!12,bcd1 ; ""

EE0C [04] 6E0583 372 mov #$5,adres

EE0F [05] CDEEC1 373 jsr IND_RET

EE12 [04] 6E1484 374 mov #!20,bcd100 ; ""

EE15 [04] 6E1585 375 mov #!21,bcd10 ; ""

EE18 [04] 6E0E86 376 mov #!14,bcd1 ; ""

EE1B [05] CDEEC1 377 jsr IND_RET

378 exitdav:

379

380 ;------ ---------

EE1E [04] C7FFFF 381 sta $ffff

EE21 [04] 1189 382 bclr 0,bitf

EE23 [04] 1789 383 bclr 3,bitf

EE25 [05] 0789FD 384 brclr 3,bitf,$ ; COCO1=0

EE28 [03] B68B 385 lda upress

EE2A [02] A105 386 cmp #!5

EE2C [03] 22F0 387 bhi exitdav

EE2E [03] CCEC39 388 jmp main

389

390 ;------------------------------------------------;

391

392

393

394

395

396 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

397

398

399 ADC_INT: ;

EE31 [02] 8B 400 pshh

EE32 [05] 018913 401 brclr 0,bitf,adm1 ; =0

adm1

EE35 [05] 038907 402 brclr 1,bitf,adm2 ; 1=0

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 10

EE38 [04] 1889 403 bset 4,bitf

EE3A [05] 4E3D8A 404 mov ADR,upress1

EE3D [03] 2004 405 bra zap

406 adm2:

EE3F [04] 1589 407 bclr 2,bitf ; 2

EE41 [04] 1289 408 bset 1,bitf ;. 1

409 zap:

EE43 [04] 6E413C 410 mov #$41,ADSCR ;

PTB1

411

EE46 [03] 2011 412 bra exit

413 adm1:

EE48 [05] 058907 414 brclr 2,bitf,adm3 ; 2=0

EE4B [04] 1689 415 bset 3,bitf

EE4D [05] 4E3D8B 416 mov ADR,upress

EE50 [03] 2004 417 bra zap1

418 adm3:

EE52 [04] 1389 419 bclr 1,bitf ; 1

EE54 [04] 1489 420 bset 2,bitf ; . 2

421 zap1:

EE56 [04] 6E403C 422 mov #$40,ADSCR ;

PTB0

423 exit:

EE59 [02] 8A 424 pulh

EE5A [07] 80 425 rti

426

427

428

429 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

430

431 timer_int: ;

EE5B [04] 1F20 432 bclr 7,TSC ; TOF

EE5D [04] 3C9A 433 inc sec10

EE5F [03] B69A 434 lda sec10

EE61 [02] A109 435 cmp #$9

EE63 [03] 250E 436 blo exittime ; sec10>9

EE65 [03] 3F9A 437 clr sec10

EE67 [04] 3C99 438 inc sec

EE69 [04] 3C95 439 inc ovsec

EE6B [03] B695 440 lda ovsec

EE6D [02] A105 441 cmp #!5

EE6F [03] 2502 442 blo exittime

EE71 [04] 1A89 443 bset 5,bitf

444 exittime:

EE73 [07] 80 445 rti

446

447

448 ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

449

450

451 VOLTS_PRESSURE_RET: ; .

452 ;


.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 11

453 ; -TCP

EE74 [02] 87 454 psha

EE75 [02] 8B 455 pshh

EE76 [02] 89 456 pshx

457

EE77 [03] B68C 458 lda udav

EE79 [03] B08D 459 sub const ;const-

EE7B [01] 97 460 tax

EE7C [04] D6EF14 461 lda TCP,x

EE7F [03] B78E 462 sta dav ;

dav

463

EE81 [02] 88 464 pulx

EE82 [02] 8A 465 pulh

EE83 [02] 86 466 pula

EE84 [04] 81 467 rts

468

469

470

471

472 ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

473

474

475

476

477 BCD_RET: ; BCD

478 ; "y"

479 ;BCD100 -

480 ;BCD10 -

481 ;BCD1 -

482

EE85 [02] 87 483 psha

EE86 [02] 8B 484 pshh

EE87 [02] 89 485 pshx

486

EE88 [03] B68F 487 lda y ;

EE8A [02] A163 488 cmp #!99

EE8C [03] 2206 489 bhi bcd100m ; y>99 bcd100m

EE8E [02] A109 490 cmp #!9

EE90 [03] 2210 491 bhi bcd10m ; y>9 bcd10m

EE92 [03] 2020 492 bra bcd1m

493 bcd100m:

EE94 [02] AE64 494 ldx #!100 ;100-

EE96 [07] 52 495 div

EE97 [03] B784 496 sta BCD100 ; BCD100

EE99 [04] 35A4 497 sthx pmem1

EE9B [03] 450000 498 ldhx #!0

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 12

EE9E [03] B6A4 499 lda pmem1 ;

EEA0 [03] 2003 500 bra mb1

501 bcd10m:

EEA2 [04] 6E0A84 502 mov #$a,BCD100 ; BCD100

503 mb1:

EEA5 [02] AE0A 504 ldx #!10 ;10-

EEA7 [07] 52 505 div ; 10

EEA8 [03] B785 506 sta BCD10 ; BCD10

EEAA [04] 35A4 507 sthx pmem1

EEAC [03] 450000 508 ldhx #!0

EEAF [05] 4EA486 509 mov pmem1 BCD1

EEB2 [03] 200C 510 bra exitb

511 bcd1m:

EEB4 [04] 6E0A84 512 mov #$a,BCD100 ; ⠠ BCD100

EEB7 [04] 6E0A85 513 mov #$a,BCD10 ; BCD10

EEBA [05] 4E8F86 514 mov y,BCD1

515

516

EEBD [02] 88 517 pulx

EEBE [02] 8A 518 pulh

EEBF [02] 86 519 pula

EEC0 [04] 81 520 exitb: rts

521

522

523

524

525

526 ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

527

528

529

530 IND_RET: ;

531 ; :

532 ;-

533 ;(BCD100,BCD

10,BCD1)

534 ;-

EEC1 [02] 87 535 psha

EEC2 [02] 8B 536 pshh

EEC3 [02] 89 537 pshx

538

EEC4 [04] 6E0388 539 mov #$3,ci

EEC7 [04] 6E8087 540 mov #$80,indx ; ind !!!!!!!!!!!!!!!!!

EECA [04] 6E84A3 541 mov #$84,bcdx ; bcd100 bcdx

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 13

EECD [03] BE84 542 ldx BCD100

543 stind:

EECF [04] D6EFAE 544 lda TCI,x ;TCI-

EED2 [04] 3CA3 545 inc BCDX

EED4 [03] BE87 546 ldx indx

EED6 [02] F7 547 sta ,x ; 񠠠

EED7 [04] 3C87 548 inc indx ; IND

EED9 [04] 1501 549 bclr 2,PTB ;. 0

PTB2

EEDB [04] 1701 550 bclr 3,PTB

EEDD [05] 4E8303 551 mov adres,PTD ;

PTD

EEE0 [04] 1801 552 bset 4,PTB

EEE2 [01] 9D 553 nop

EEE3 [01] 9D 554 nop

EEE4 [01] 9D 555 nop ;

EEE5 [01] 9D 556 nop

EEE6 [01] 9D 557 nop

EEE7 [04] 1901 558 bclr 4,PTB

EEE9 [04] AD1D 559 bsr deleysret ; 30mkc

EEEB [04] 1401 560 bset 2,PTB

EEED [04] 1701 561 bclr 3,PTB

EEEF [04] 7E03 562 mov x+,PTD ;

EEF1 [04] 1801 563 bset 4,PTB

EEF3 [01] 9D 564 nop

EEF4 [01] 9D 565 nop ;

EEF5 [01] 9D 566 nop

EEF6 [01] 9D 567 nop

EEF7 [01] 9D 568 nop

EEF8 [04] 1901 569 bclr 4,PTB

EEFA [04] AD0C 570 bsr deleysret ; 30mkc

EEFC [04] 3C83 571 inc adres ;

EEFE [03] BEA3 572 ldx BCDX ;----

EF00 [02] FE 573 ldx ,x ;--------

EF01 [05] 3B88CB 574 dbnz ci,stind ;

575

EF04 [02] 88 576 pulx

EF05 [02] 8A 577 pulh

EF06 [02] 86 578 pula

EF07 [04] 81 579 rts

580

581 ;\\\\\\ 30 \\\\\\\\\\\

582

583 deleysret:

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 14

584

585

586

EF08 [02] 87 587 psha

EF09 [02] 8B 588 pshh

EF0A [02] 89 589 pshx

590

EF0B [02] A61E 591 lda #!30

592 loopdel:

EF0D [01] 4A 593 deca

EF0E [03] 26FD 594 bne loopdel

595

EF10 [02] 88 596 pulx

EF11 [02] 8A 597 pulh

EF12 [02] 86 598 pula

EF13 [04] 81 599 rts

600

601 ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

602

603 ;///// ////////

604

605 TCP:

606

EF14 00 607 db !0

EF15 01 608 db !1

EF16 03 609 db !3

EF17 05 610 db !5

EF18 06 611 db !6

EF19 08 612 db !8

EF1A 0A 613 db !10

EF1B 0B 614 db !11

EF1C 0D 615 db !13

EF1D 0F 616 db !15

EF1E 10 617 db !16

EF1F 12 618 db !18

EF20 14 619 db !20

EF21 15 620 db !21

EF22 17 621 db !23

EF23 19 622 db !25

EF24 1A 623 db !26

EF25 1C 624 db !28

EF26 1E 625 db !30

EF27 1F 626 db !31

EF28 21 627 db !33

EF29 23 628 db !35

EF2A 24 629 db !36

EF2B 26 630 db !38

EF2C 28 631 db !40

EF2D 29 632 db !41

EF2E 2B 633 db !43

EF2F 2D 634 db !45

EF30 2E 635 db !46

EF31 30 636 db !48

EF32 32 637 db !50

EF33 33 638 db !51

EF34 35 639 db !53

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 15

EF35 37 640 db !55

EF36 38 641 db !56

EF37 3A 642 db !58

EF38 3C 643 db !60

EF39 3D 644 db !61

EF3A 3F 645 db !63

EF3B 41 646 db !65

EF3C 42 647 db !66

EF3D 44 648 db !68

EF3E 46 649 db !70

EF3F 47 650 db !71

EF40 49 651 db !73

EF41 4B 652 db !75

EF42 4C 653 db !76

EF43 4E 654 db !78

EF44 50 655 db !80

EF45 51 656 db !81

EF46 53 657 db !83

EF47 55 658 db !85

EF48 56 659 db !86

EF49 58 660 db !88

EF4A 5A 661 db !90

EF4B 5B 662 db !91

EF4C 5D 663 db !93

EF4D 5F 664 db !95

EF4E 60 665 db !96

EF4F 62 666 db !98

EF50 64 667 db !100

EF51 65 668 db !101

EF52 67 669 db !103

EF53 69 670 db !105

EF54 6A 671 db !106

EF55 6C 672 db !108

EF56 6E 673 db !110

EF57 6F 674 db !111

EF58 71 675 db !113

EF59 73 676 db !115

EF5A 74 677 db !116

EF5B 76 678 db !118

EF5C 78 679 db !120

EF5D 79 680 db !121

EF5E 7B 681 db !123

EF5F 7D 682 db !125

EF60 7E 683 db !126

EF61 80 684 db !128

EF62 82 685 db !130

EF63 83 686 db !131

EF64 85 687 db !133

EF65 87 688 db !135

EF66 88 689 db !136

EF67 8A 690 db !138

EF68 8C 691 db !140

EF69 8D 692 db !141

EF6A 8F 693 db !143

EF6B 91 694 db !145

EF6C 92 695 db !146

EF6D 94 696 db !148

EF6E 96 697 db !150

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 16

EF6F 97 698 db !151

EF70 99 699 db !153

EF71 9B 700 db !155

EF72 9C 701 db !156

EF73 9E 702 db !158

EF74 A0 703 db !160

EF75 A1 704 db !161

EF76 A3 705 db !163

EF77 A5 706 db !165

EF78 A6 707 db !166

EF79 A8 708 db !168

EF7A AA 709 db !170

EF7B AB 710 db !171

EF7C AD 711 db !173

EF7D AF 712 db !175

EF7E B0 713 db !176

EF7F B2 714 db !178

EF80 B4 715 db !180

EF81 B5 716 db !181

EF82 B7 717 db !183

EF83 B9 718 db !185

EF84 BA 719 db !186

EF85 BC 720 db !188

EF86 BE 721 db !190

EF87 BF 722 db !191

EF88 C1 723 db !193

EF89 C3 724 db !195

EF8A C4 725 db !196

EF8B C6 726 db !198

EF8C C8 727 db !200

EF8D C9 728 db !201

EF8E CB 729 db !203

EF8F CD 730 db !205

EF90 CE 731 db !206

EF91 D0 732 db !208

EF92 D2 733 db !210

EF93 D3 734 db !211

EF94 D5 735 db !213

EF95 D7 736 db !215

EF96 D8 737 db !216

EF97 DA 738 db !218

EF98 DC 739 db !220

EF99 DD 740 db !221

EF9A DF 741 db !223

EF9B E1 742 db !225

EF9C E2 743 db !226

EF9D E4 744 db !228

EF9E E6 745 db !230

EF9F E7 746 db !231

EFA0 E9 747 db !233

EFA1 EB 748 db !235

EFA2 EC 749 db !236

EFA3 EE 750 db !238

EFA4 F0 751 db !240

EFA5 F1 752 db !241

EFA6 F3 753 db !243

EFA7 F5 754 db !245

EFA8 F6 755 db !246

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 17

EFA9 F8 756 db !248

EFAA FA 757 db !250

EFAB FB 758 db !251

EFAC FD 759 db !253

EFAD FF 760 db !255

761

762

763 ;//////////////////////////////////////////////

764

765 ;////////// //

766

767 TCI:

EFAE 03 768 db $03 ;0

EFAF 13 769 db $13 ;1

EFB0 23 770 db $23 ;2

EFB1 33 771 db $33 ;3

EFB2 43 772 db $43 ;4

EFB3 53 773 db $53 ;5

EFB4 63 774 db $63 ;6

EFB5 73 775 db $73 ;7

EFB6 83 776 db $83 ;8

EFB7 93 777 db $93 ;9

EFB8 02 778 db $02 ;

EFB9 34 779 db $34 ;

EFBA 5A 780 db $5a ;

EFBB 0E 781 db $0e ;

EFBC 14 782 db $14 ;

EFBD 8A 783 db $8a ;

EFBE 9A 784 db $9a ;

EFBF 7A 785 db $7a ;

EFC0 F4 786 db $f4 ;

EFC1 CA 787 db $ca ;

EFC2 0A 788 db $0a ;

EFC3 B4 789 db $b4 ;

790

791 ;///////////////////////////////////////////////////

///////////////////////////////////////

792

793

FFDE 794 org $ffde

FFDE EE31 795 dw ADC_INT ;

FFF2 796 org $fff2

FFF2 EE5B 797 dw timer_int;

FFFE 798 org $fffe

FFFE EC00 799 dw start ;

800

Symbol Table

ADC_INT EE31

ADICLK 003E

ADM1 EE48

ADM2 EE3F

ADM3 EE52

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 18

ADR 003D

ADRES 0083

ADSCR 003C

AMP1 0098

AMP2 0097

AMPMET ECD4

BCD1 0086

BCD10 0085

BCD100 0084

BCD100M EE94

BCD10M EEA2

BCD1M EEB4

BCDX 00A3

BCD_RET EE85

BITF 0089

BITF1 0091

CBM ED42

CI 0088

CMP1 0092

CMPAD 0096

CONFIG1 001F

CONFIG2 001E

CONST 008D

DAV 008E

DDRA 0004

DDRB 0005

DDRD 0007

DEL 0093

DELEYSRET EF08

DIA 00A1

DVBM ECE2

EXIT EE59

EXITB EEC0

EXITDAV EE1E

EXITTIME EE73

IND 0080

INDX 0087

IND_RET EEC1

KBIER 001B

KBSCR 001A

LOOP EC9D

LOOP1 ECA4

LOOP11 ED57

LOOP2 ECA0

LOOP20 ED53

LOOPAMP ECF8

LOOPDEL EF0D

LOP ECC7

M55 ECED

MAIN EC39

MB1 EEA5

MTIME ED73

OVSEC 0095

PDCR 000A

PEREM ED4D

PMEM1 00A4

POR 0094

PR1 009E

.asm Assembled with CASM08Z 25.02.03 9:58:45 PAGE 19

PR2 00A0

PR2M EDAA

PROIM ED2F

PTA 0000

PTAPUE 000D

PTB 0001

PTD 0003

PUL 00A2

PULSE 0090

RAZNOM ED8E

RM ECEA

RORM EDFC

SBM EC3D

SEC 0099

SEC10 009A

SIS 009F

START EC00

STIND EECF

TCI EFAE

TCNTH 0021

TCNTL 0022

TCP EF14

TIME1 009B

TIME2 009C

TIME2M ED88

TIME3 009D

TIMER_INT EE5B

TMODH 0023

TMODL 0024

TSC 0020

UDAV 008C

UPRESS 008B

UPRESS1 008A

VOLTS_PRESSURE_R EE74

Y 008F

ZAP EE43

ZAP1 EE56


 
2011 , .