📄 description.txt
字号:
# This program will Demonstrate the use of the Mico8 V3.0
# In a ECP2-6 device. It will use EBR ram to
# store the instruction set.
#
#
# The demo will show the following functionality:
# UART TX
# PWM
# LEDs
# 4x20 character LCD display
# SEROUT
#
# Interrupt handler
# RX UART
# DIP8 DIPSwitch inputs
# RX UART
#
#
# Mico8 puts a welcome message on the LCD, and starts a running wave on the LEDs
# Data received from RX UARTA is displayed on the 7 segment display
# Dip8 inputs are used to set the PWM duty Cycle (connected to Piezzo buzzer)
# RX UArtB data is received by mico8 and retransmitted to TX UART
#
#
#Mico8 address bus:
#------------------
#
#UART settings:
#This UART runs at a default 9600baud,8 data bits,1 stop bit no parity
#
# Address map:
# 0-0x00 00000000: NU
# 1-0x01 00000001: NU
# 2-0x02 00000010: NU
# 3-0x03 00000011: W 7 Segments display
# 4-0x04 00000100: W LCD Data register
# 5-0x05 00000101: W LCD control register
# 6-0x06 00000110: W TX Uart data register
# 7-0x07 00000111: W LED peripheral register
# 8-0x08 00001000: W PWM duty cycle register
# 9-0x09 00001001: W SEROUT peripheral register
#...
#16-0x10 00010000: R Interrupt Source Register
#17-0x11 00010001: R Interrupt data register peripheral1 = RX UARTA
#18-0x12 00010010: R Interrupt data register peripheral2 = DIP8
#19-0x13 00010011: R Interrupt data register peripheral3 = RX UARTB
#20-0x14 00010100: R Interrupt data register peripheral4
#
#
# The interrupt handler generates an interrupt when one of its peripherals
# has new data available.
# Mico8 can then read the 'Interrupt Source Register' to check what peripheral
# caused the interrupt.
# Then Mico8 can read the corresponding 'Interrupt Data Register', this automaticaly
# clears the bit in the 'Interrupt Source Register'.
# When Mico8 exits its interrupt service routine, the Mico8_Intack goes low.
# At that point the Interrupt handler will check if there are still pending
# data available but in case there are it will wait for a certain amount of time
# before regenerating a new Mico8_INT.
#
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -