index addressing

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

index addressing

774件の閲覧回数
lucostiguy
Contributor I

hi i wrote a little program to generate a square wave at around 5khz. using codewarior 5.9 and indexed addressing, everything is working ok. But when i program my 68hc908qt4 the frequency is around 113hz. The only way i can have 5khz is to use extended addressing. Why ???

1 返信

716件の閲覧回数
kef2
Senior Contributor V

Looks like you put constants to .. RAM:

                org $00d0
 
pulse_cnt       dc.w  $3e7f,$1f3f,$14d5,$0f9f,$0c80,$0a6a,$08ed,$07cf,$06f1,$0640
                dc.w  $042a,$0320,$0280,$0215,$01c9,$0190,$0163
pulse_cnt_max   dc.w  $0140

Who do you think will initialize them when powered up standalone? Random values in RAM could easily produce 113Hz

Edward