nedoPC.org

Electronics hobbyists community established in 2002
Atom Feed | View unanswered posts | View active topics It is currently 17 Apr 2024 18:08



Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3
Микрокодовое ядро на ПЗУ (nedoPC-27) 
Author Message
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22523
Location: Silicon Valley
Reply with quote
Post 
Возвращаясь к прошлогодней задаче:

Shaos wrote:
Вот например задача для опробования базовой конфигурации: 16-битный счётчик, который считает вперёд, если нажать на первую кнопку, и назад, если на вторую. Индикация светодиодами, подключёнными к шине внешнего адреса - 24 сигнала из которых мы будем смотреть на младшие 16. Счётчик при включении питания обнуляется.


Code:
; RM3 connected to external port
; 2 buttons connected to 2 bit latch that connected to external P0/P1
; zeroing registers
0000: 01 00 0C 00 ; RT0=0
0001: 02 00 05 00 ; RL0=RT0
0002: 03 00 15 00 ; RL1=RT0
0003: 04 00 25 00 ; RL2=RT0
0004: 05 00 35 00 ; RL3=RT0
0005: 06 00 06 00 ; RM0=RT0
0006: 07 00 16 00 ; RM1=RT0
0007: 08 00 26 00 ; RM2=RT0
0008: 09 00 36 00 ; RM3=RT0
0009: 0A 00 07 00 ; RH0=RT0
000A: 0B 00 17 00 ; RH1=RT0
000B: 0C 00 27 00 ; RH2=RT0
000C: 0D 00 37 00 ; RH3=RT0
; put markers into RHx
000D: 0E 00 0C 01 ; RT0=1
000E: 0F 00 17 00 ; RH1=RT0 (1)
000F: 10 00 0C 02 ; RT0=2
0010: 11 00 27 00 ; RH2=RT0 (2)
0011: 12 00 37 00 ; RH3=RT0 (2)


P.S. Это только инициализация - весь остальной код напишу позже...

_________________
:dj: https://mastodon.social/@Shaos


03 Oct 2012 00:05
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 31 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.