一,打开文件(可以随文下载放置在文档中打开)。(如下图1所示)
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图1

二,调整原理图大小,适合可视,另存工程文件。(如下图2,3,4所示)
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图2

Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图3

Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图4

三,点击Source Code标签。(如下图5所示)
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图5

四,编辑main.py Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD (如下图6所示)

五,Main.py 代码:

!/usr/bin/env python3

Generated by Proteus Visual Designer for Raspberry Pi

Modules

from goto import with_goto
from stddef import *
import var
import pio
import resource
from datetime import datetime

Peripheral Configuration Code (Do Not Edit)

#—CONFIG_BEGIN—
import cpu
import VFP
import Displays

def peripheral_setup () :

Peripheral Constructors

pio.cpu=cpu.CPU ()
pio.server=VFP.VfpServer ()
pio.LCD1=Displays.I2CLDC ()
pio.server.begin (0)

Install interrupt handlers

def peripheral_loop () :
pass

#—CONFIG_END—
def variables_setup () :

Flowchart Variables

pass

Flowchart Routines

@with_goto
def chart_SETUP () :
return

@with_goto
def chart_LOOP () :
pio.LCD1.clear ()
pio.LCD1.print (" Kaillen Work Welcome You!")
sleep((3))
pio.LCD1.clear ()
pio.LCD1.print (" Code Made by --Ziegler Yin")
sleep((3))
return

Main function

def main () :

Setup

variables_setup ()
peripheral_setup ()
chart_SETUP ()

Infinite loop

while True :
peripheral_loop ()
chart_LOOP ()

Command line execution

if name == ‘main’ :
main()

六,点击构建工程按钮,编译工程。(如下图6所示)
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图6

七,点击窗口左下方仿真按钮,可见虚拟LCD16X2显示。 (如下图7,8,9所示)
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图7

Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图8
Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图9

八,选择release,点击构建工程按钮,编译工程生成Hex文件。(如下图10所示)

Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD

图10

附件Proteus8.10 VSM Studio python编译器仿真Raspberry_系列_42_I2c_LCD在已安装Proteus8.10的计算机文件夹中打开即可
需要进一步了解,请加入QQ群:976235464

相关文章:

  • 2021-05-04
  • 2022-01-12
  • 2021-10-24
  • 2021-06-12
  • 2021-08-14
  • 2021-04-17
  • 2021-06-08
  • 2021-09-16
猜你喜欢
  • 2021-04-15
  • 2021-08-20
  • 2021-04-16
  • 2021-08-16
  • 2021-09-21
  • 2022-01-17
  • 2021-09-18
相关资源
相似解决方案