首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

关于串行监控程序调试 急问![求助]

关于串行监控程序调试 急问![求助]

在freescale网站上下载了一个名字为AN2548SW1的文档,里面是监控程序代码。我用的是DG128B单片机。为什么直接将该监控程序编译后的.sx文件下载到单片机里面,然后用监控程序调试的时候,总是提示“could not connect to hardware”??
你的晶振频率是多少?你对S12SerMon2r1.def文件是否做了相应的修改?
海纳百川  有容乃大
晶振是16M的。我没有更改def文件。请问该如何修改呢??
AN2548里有说明的。这个文件本身很简单,你看一下就明白了。
海纳百川  有容乃大
这是那个def文件。能看明白,我也看了AN2548。pdf,可感觉没有需要改的地方呢。
版主多多指点下奥~~
.........................(略)
Dx128:
;EEpromStart: equ $0800 ;eeprom start
;EEpromEnd: equ $0FFF ;eeprom end
;RamStart: equ $2000 ;first RAM location
;FlashBlks: equ $02 ;# of flash blks
;SectorSize: equ $0200 ;Flash sector size
;LowestPage: equ $38 ;lowest page
agesBlk: equ $04 ;pages per block
;softwareID4: equ $0110 ;device ID #
.........................(略)
;OscFreq: equ 4000 ;Enter Osc speed
;initSYNR: equ $05 ; mult by synr + 1 = 6 (24MHz)
;initREFDV: equ $00 ;
;---------------------------------------------------------------------
OscFreq: equ 8000 ;Enter Osc speed
initSYNR: equ $02 ; mult by synr + 1 = 3 (24MHz)
initREFDV: equ $00 ;
;---------------------------------------------------------------------
;OscFreq: equ 16000 ;Enter Osc speed
;initSYNR: equ $02 ; mult by synr + 1 = 3/2 (24MHz)
;initREFDV: equ $01 ; divide by Refdiv + 1
;---------------------------------------------------------------------
;OscFreq: equ 25000 ;Enter Osc speed
;initSYNR: equ $00 ; mult by synr + 1 = 1 (25MHz)
;initREFDV: equ $00 ; divide by Refdiv + 1

;SwPort: equ PTQ ;pushbutton sw connected to port Q
;Switch: equ PTQ0 ;switch connected to PTQ bit-5
;SwPullup: equ PERQ ;pullup enable for sw port
;mSwPullup: equ PTQ0 ;Mask value to enable for sw port
;---------------------------------------------------------------------
;SwPort: equ PTP ;pushbutton sw connected to port P
;Switch: equ PTP5 ;switch connected to PTP bit-5
;SwPullup: equ PERP ;pullup enable for sw port
;mSwPullup: equ PTP5 ;Mask value to enable for sw port
;---------------------------------------------------------------------
SwPort: equ PORTA ;pushbutton sw connected to port A
Switch: equ PTA6 ;switch connected to PTA bit-6
SwPullup: equ PUCR ;pullup enable for sw port
mSwPullup: equ PUPAE ;Mask value to enable for sw port
;---------------------------------------------------------------------
;SwPort: equ PORTB ;pushbutton sw connected to port B
;Switch: equ PTB4 ;switch connected to PTB bit-4
;Switch: equ PTB0 ;switch connected to PTB bit-0
;SwPullup: equ PUCR ;pullup enable for sw port
;mSwPullup: equ PUPBE ;Mask value to enable for sw port
;---------------------------------------------------------------------
;SwPort: equ PTL ;pushbutton sw connected to port P
;Switch: equ PTL6 ;switch connected to PTP bit-5
;SwPullup: equ PERL ;pullup enable for sw port
;mSwPullup: equ PTL6 ;Mask value to enable for sw port
;---------------------------------------------------------------------
;SwPort: equ PTP ;pushbutton sw connected to port P
;Switch: equ PTP0 ;switch connected to PTP bit-0
;SwPullup: equ PERP ;pullup enable for sw port
;mSwPullup: equ PTP0 ;Mask value to enable for sw port
;---------------------------------------------------------------------
;---------------------------------------------------------------------
;SwPort: equ PTG ;pushbutton sw connected to port G
;Switch: equ PTG4 ;switch connected to PTP bit-4
;SwPullup: equ PERG ;pullup enable for sw port
;mSwPullup: equ PTG4 ;Mask value to enable for sw port
;---------------------------------------------------------------------

AllowSci0 equ $0

我摘取了自己认为有用的程序,请版主帮帮忙~~
SwPort那一段程序选择哪个呢?还有最后的一句话是0 还是1呢?
已经可以了~~非常感谢版主
还有一个小疑问:SwPort,Switch,SwPullup,mSwPullup这四个定义的是什么呢?干什么用的?
这只是当你外接按键时用的。
海纳百川  有容乃大
返回列表