6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 4:52 pm

All times are UTC




Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
PostPosted: Thu Mar 16, 2017 3:39 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Which of these accesses are reads and which are writes? It helps to include such details.

Really we're trying to determine if the program is executing as intended. Have you studied the program, and do you feel you understand what ought to happen as it begins?

I haven't studied the program (has it been posted?) but for sure the ACIA needs to be initialized before it can produce output. So, let's verify that that's happening. When troubleshooting it's important to be methodical. Conduct your investigation and make your conclusions step by step.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 16, 2017 4:05 pm 
Offline

Joined: Sun Mar 05, 2017 4:31 pm
Posts: 36
These three accesses are writes, and according to the code they are the correct adress and value, so everything is as expected.

Btw, I included the monitor, and the port of ehBASIC im using.


Attachments:
File comment: This is the port of ehBASIC
basic.asm [244.47 KiB]
Downloaded 67 times
File comment: This is the monitor
min_mon.asm [4.42 KiB]
Downloaded 81 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 16, 2017 5:00 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Right -- the three accesses you described result from this code
Code:
ACIA_init
   LDA   #$00
   STA   ACIAstatus      ; Soft reset
   LDA   #$0B
   STA   ACIAcommand      ; Parity disabled, IRQ disabled
   LDA   #$1E
   STA   ACIAcontrol      ; Set output for 8-N-1 9600


Next question, I'd say, is this. Is the ACIA actually outputting any serial data? (Maybe it is, but something is amiss with the terminal/whatever which you're using to receive and display that data.) So, when the program starts is there any activity on the TXD pin?

There are various options, but here's what I recommend. If you have a logic probe, put it on the TXD pin and see if there's activity when you boot. (Watch carefully, as the min_mon greeting message takes just fraction of a second to transmit.)

If you don't have a logic probe then it's better to arrange for the greeting message to get transmitted again and again endlessly (see altered code below). After booting into the altered code you should, using a voltmeter, be able to observe a change on the TXD pin.

Code:
; now do the signon message, Y = $00 here

LAB_signon
   LDA   LAB_mess,Y      ; get byte from sign on message
   BEQ   LAB_nokey      ; exit loop if done

   JSR   V_OUTP      ; output character
   INY            ; increment index
   BNE   LAB_signon      ; loop, branch always

LAB_nokey
    LDY #0           ;<----- new/altered
    JMP LAB_signon   ;<----- new/altered


Hopefully after this you'll know what direction to take for further investigation. I have a hunch the problem lies with the receiving device. (Are the handshake lines set to the appropriate levels?) But if I'm wrong it won't be the first time. :)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 16, 2017 7:56 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
I haven't taken time to re-read the entire six preceding pages to verify, but make sure you're heeding this paragraph in the address-decoding page of the 6502 primer:

    The VIAs and ACIAs have their own Φ2 input, and the address decoding must provide the appropriate valid chip-select before the Φ2 rising edge. I know from experience that the VIA will not work if the CS waits for the Φ2 rising edge. (I found out in about 1986, then years later had to use the trick shown near the bottom of this page when I used a pair of 6522's in a Commodore 64 I/O expansion board, the C64 not giving an early select signal.) Do not bring Φ2 into these ICs' CS logic like the circuit above does for RAM.

If you can read back from the command and control registers the values you stored there, that's a good indication that it's probably working. The values you say you stored should work though. Oh, one more thing: the ACIA's CTS\ input must be true (low) for the transmitter to operate, and the DCD\ must be true for the receiver to operate.

With the exception of the hardware problem I had before I put the capacitor on the crystal input when using just a crystal (no external oscillator), I have never had any trouble getting the '51 to work as intended on first try. If you just follow the data sheet, it works. There's a tendency however to think that much of the data sheet is for someone else.

Oh, yet one more thing comes to mind: Solderless breadboards are the worst of all worlds for computer construction. We won't forbid it (as if we could anyway), but please know that the Φ2 clock input is the most critical to have a clean signal on, particularly to the processor. Make sure the signal and ground connections from the clock oscillator (and divider flip-flop, if used) to the processor are as short and direct as you can reasonably get them. One of our other members made a computer on a breadboard several years ago and found that he could not get it going until he did it this way, since ringing in, and coupling from, other lines was corrupting the clock signal. All those arches without accompanying grounds make for great antennas for transmitting and receiving digital noise. Next most important would be to make the Φ2 connections (and accompanying ground connections) to the VIA and ACIA also as short and direct as practical.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC


Who is online

Users browsing this forum: DRG, jgharston and 21 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: