vm.prj

来自「串口转发IIC程序」· PRJ 代码 · 共 40 行

PRJ
40
字号
; ************************************************************
; PROJECT:
; AUTHOR:
; ************************************************************

; Micro + software running
; ------------------------------------------------------------
.MICRO "ATmega16"
.TOOLCHAIN "GENERIC"
.TARGET    "com2iic.hex"
.COFF      "com2iic.cof"
;.SOURCE "source1.c" ; Optional with GENERIC toolchain

.TRACE              ; Activate micro trace

; Following lines are optional; if not included
; exactly these values are taken by default
; ------------------------------------------------------------
.POWER VDD=5 VSS=0  ; Power nodes
.CLOCK 11.0592meg         ; Micro clock
.STORE 250m         ; Trace (micro+signals) storage time

; Micro nodes: RESET, AREF, PA0-PA7, PB0-PB7, PC0-PC7, PD0-PD7, ACO, TIM1OVF
; Define here the hardware around the micro
; ------------------------------------------------------------

;------------------------------------------------------------
; I2 monitor cells  SDA  SCL
;
Xone   I2C(100K 10) pc1  pc0 ;  100KHz master clock, slave addr = 10 (decimal)

Rsda VDD PC1 10K ; Pullup resistors, also necessary in VMLAB!
Rscl VDD PC0 10K ; for I2C

Xtwo TTY(115200 8 0 0 1 4) pd0 pd1

.plot v(pc1) v(pc0) v(pd0) v(pd1)


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?