6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 1:58 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SOLVED: ACIA CDP65C51
PostPosted: Sat Mar 21, 2015 5:53 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Hi,

I started a new project and now I'm stuck. I have a minimal 6502A System with 2kbyte RAM and 2kbyte ROM and a CDP65C51AE4. Everything uses a single 1.834MHz clock. "Hello World!!" after RESET works, but it seams the ACIA never receives a character. I already replaced the CDP65C51EA4 but nothing changed. I suspect a most stupid error. I have now the following minimal code to test my system

Code:
ACIA1      = $c090

ACIA1dat   = ACIA1 + 0
ACIA1sta   = ACIA1 + 1
ACIA1cmd   = ACIA1 + 2
ACIA1ctl   = ACIA1 + 3

   *=$FF00
reset
      ldy   #0
wait
      iny
      bne   wait
      sty   $0
      sty   $1
      lda   #$1F            ; 19.2K/8/1
      sta   ACIA1ctl         ; control reg
      lda   #$0B            ; N parity/echo off/rx int off/ dtr active low
      sta   ACIA1cmd         ; command reg
      inc   $0
main
      ldx   #0
MAINL
      lda   ACIA1sta      ; serial port status
      and   #$10         ; is tx buffer empty
      beq   MAINL         ; no
      inc   $0
      lda   hello,x
      beq   MAINC
      sta   ACIA1dat      ; put character to Port
      inx
      bne   MAINL
MAINC
      
WAITC
      inc   $0
      LDA   ACIA1sta      ; Serial Port Status
      AND   #$08         ; Is RCVR Full
      BEQ WAITC
      inc   $1
      lda   ACIA1dat
      sta   ACIA1dat
      jmp   main
hello   .text "Hello World!!"
      .byte $0d, $0a, $00


   *=$FFF8
nmi:   rti
irq:   rti
   .byte   <NMI      ;NMI VECTOR
   .byte   >NMI
   .byte   <RESET      ;RESET VECTOR
   .byte   >RESET
   .byte   <IRQ      ;IRQ VECTOR
   .byte   >IRQ


It prints "Hello World!!" <CR> <LF> and waits for a input character and then just prints the initial message again. Location $1 is not incremented (the RAM is a DP-RAM so I can look into it from the other side). Any ideas what I'm missing?

Regards

Peter

EDIT: I FORGOT TO UNCHECK RTS/CTS FLOW CONTROL IN THE TERMINAL EMULATION PROGRAM I USED :roll: :roll:


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 21, 2015 6:52 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Is the ACIA's DCD\ input low? The receiver won't operate if it's high.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 21, 2015 8:12 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Yeah thanks for the hint. But as mentioned (see edit) I found the stupid problem, the RTS/CTS flow control of the terminal emulation. The Inputs of the ACIA are all tied to ground for the moment.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 69 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: