Daryl's 6502 SBC help

For discussing the 65xx hardware itself or electronics projects.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Daryl's 6502 SBC help

Post by BigDumbDinosaur »

beholder wrote:
Here's the code:
* = $8000

ACIA_DATA = $7F70
ACIA_STAT = $7F71
ACIA_COMM = $7F72
ACIA_CTRL = $7F73

VIA1 = $7F50
VIA2 = $7F51

lda #$FF
sta $7F52
sta $7F53
sta VIA1
sta VIA2

lda #%00001011
sta ACIA_COMM
sta VIA1
lda #%00011111
sta ACIA_CTRL
sta VIA2

TX
lda ACIA_STAT
sta VIA1
and #$10
beq TX

lda #$AA
sta ACIA_DATA
sta VIA2
jmp TX
In the future, may I suggest you bound your code expositions with the [ code ] and [ /code ] markers? Viz:

Code: Select all

         *=$8000

ACIA_DATA=$7F70
ACIA_STAT=$7F71
ACIA_COMM=$7F72
ACIA_CTRL=$7F73

VIA1     =$7F50
VIA2     =$7F51

         lda #$FF
         sta $7F52
         sta $7F53
         sta VIA1
         sta VIA2

         lda #%00001011	
         sta ACIA_COMM
         sta VIA1
         lda #%00011111	
         sta ACIA_CTRL
         sta VIA2

TX       lda ACIA_STAT
         sta VIA1
         and #$10
         beq TX

         lda #$AA
         sta ACIA_DATA
         sta VIA2
         jmp TX
Doing so will greatly improve readability.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
KC9UDX
Posts: 246
Joined: 07 Dec 2013
Location: The Kettle Moraine

Re: Daryl's 6502 SBC help

Post by KC9UDX »

BigDumbDinosaur wrote:
Doing so will greatly improve readability.
Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.

In fact, until now, I was under the impression that many posters here intentionally write their code in a way that is difficult for me to read. I will have to keep in mind to try to view blocks of code another way.
Attachments
Screenshot_2016-09-13-17-03-21_crop_254x600.jpg
Last edited by KC9UDX on Tue Sep 13, 2016 10:29 pm, edited 1 time in total.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Daryl's 6502 SBC help

Post by GARTHWILSON »

KC9UDX wrote:
Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.
What are you seeing? I don't use a smartphone or tablet, but I checked nearly every page of my website on our son's smartphone, and it all appeared as it should, basically the same as on my large PC monitor but tiny. Everything showed up exactly as I intended, without my putting any effort at all into making it mobile-friendly.
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?
User avatar
KC9UDX
Posts: 246
Joined: 07 Dec 2013
Location: The Kettle Moraine

Re: Daryl's 6502 SBC help

Post by KC9UDX »

GARTHWILSON wrote:
KC9UDX wrote:
Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.
What are you seeing? I don't use a smartphone or tablet, but I checked nearly every page of my website on our son's smartphone, and it all appeared as it should, basically the same as on my large PC monitor but tiny. Everything showed up exactly as I intended, without my putting any effort at all into making it mobile-friendly.
It took me a while but I attached an image; please see my previous post.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Daryl's 6502 SBC help

Post by GARTHWILSON »

So can't you just rotate it 90° to get a landscape layout? It works automatically with all the smartphones I've seen.
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?
User avatar
KC9UDX
Posts: 246
Joined: 07 Dec 2013
Location: The Kettle Moraine

Re: Daryl's 6502 SBC help

Post by KC9UDX »

I guess so. I hadn't realised that it would affect the code blocks.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Daryl's 6502 SBC help

Post by 8BIT »

In case this helps:
If you have an android phone, you can press the three dots in the upper right of Chrome and there's an option to "Request Desktop Site". Check the box and it will try to load the normal web page vs.the mobile version. That usually fixes forced screen wrap (narrow screens) for me.

Daryl
Please visit my website -> https://sbc.rictor.org/
Tor
Posts: 597
Joined: 10 Apr 2011
Location: Norway/Japan

Re: Daryl's 6502 SBC help

Post by Tor »

8BIT wrote:
In case this helps:
If you have an android phone, you can press the three dots in the upper right of Chrome and there's an option to "Request Desktop Site". Check the box and it will try to load the normal web page vs.the mobile version. That usually fixes forced screen wrap (narrow screens) for me.

Daryl
Yep, that's the only way of reading any website on a mobile phone, or any mobile or small-screened device (e.g. tablets), in my experience. Because those sites that have any kind of 'mobile' version will, among other ill things, disable zoom, which is completely counter-intuitive.

So my Android etc. devices all have their browsers permanently set to 'desktop'.

-Tor
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Daryl's 6502 SBC help

Post by BigEd »

On this site at least, it seems you can double-tap on an element to zoom it to fit. But using landscape is usually my first resort, with desktop mode second. But I see we're thoroughly off-topic now!
beholder
Posts: 63
Joined: 02 Sep 2015

Re: Daryl's 6502 SBC help

Post by beholder »

Hello.
Here's a video of my oscilloscope probing the 6551 pin 7:
https://www.youtube.com/watch?v=1qdtXO_ ... e=youtu.be

Do you think this variation might be too high?
Should I change capacitor or resistor?
Thanks
User avatar
KC9UDX
Posts: 246
Joined: 07 Dec 2013
Location: The Kettle Moraine

Re: Daryl's 6502 SBC help

Post by KC9UDX »

beholder wrote:
Hello.
Here's a video of my oscilloscope probing the 6551 pin 7:
https://www.youtube.com/watch?v=1qdtXO_ ... e=youtu.be

Do you think this variation might be too high?
Should I change capacitor or resistor?

No, I think it's right in line with what Garth said. You would see different results on a good 10 digit counter.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Daryl's 6502 SBC help

Post by GARTHWILSON »

Agreed. The variation seems to be a result of the noise you're picking up somewhere. The 'scope is a great tool, but trying to get frequency from cursors on a single cycle with noise on it isn't going to work very well. A good counter will count cycles for a tenth of a second or a whole second or something like that. A whole second would give you 6½ digits at 1.8MHz. What the 'scope is doing there is like putting the counter on the "period" setting which is what you do for extremely low frequencies where you can't wait for lots of cycles.
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?
beholder
Posts: 63
Joined: 02 Sep 2015

Re: Daryl's 6502 SBC help

Post by beholder »

Hello everyone.

I've been trying to figure out my sbc but not success yet.
I suspect my SBC might not be working correctly at full speed (1MHz) when using the oscillator.
When I probe the oscillator with my oscilloscope it seems fine, outputting a steady signal.

The way I've been testing my sbc I/O so far is by providing a slower clock by an arduino output pin.
Then I read the VIA's outputs.
I did a small test where my via 2 ports will output a growing 16 bit number from $0000 to $FFFF.
When I use the arduino's clock signal it works perfectly... but when I use the 1MHz can oscillator the leds dont blink.
1 port is all 1s and the second port is all 0s.

Have anyone had issues with sbc not working correctly when using 1MHz can oscillator?
Thanks
beholder
Posts: 63
Joined: 02 Sep 2015

Re: Daryl's 6502 SBC help

Post by beholder »

Yeah, so I checked the 6502 reset vector pin 1 and it's going HIGH then LOW.
Seems like when the sbc is at full 1MHz the 6502 is resetting constantly.
Anyone had this problem before?

Thanks!
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Daryl's 6502 SBC help

Post by Dr Jefyll »

beholder wrote:
Yeah, so I checked the 6502 reset vector pin 1 and it's going HIGH then LOW.
Seems like when the sbc is at full 1MHz the 6502 is resetting constantly.
Pin 1 (VPB) goes low when a vector is being fetched. This could mean Reset, but altogether there are three vectors to consider: reset (triggered by the RESB pin) and the two interrupts (triggered by IRQB and NMIB).

I suggest you review what's connected to these three pins, and verify they remain high when they're supposedly inactive. (IRQB and NMIB, if not used, usually get tied to Vcc -- possibly using a pullup resistor.)

For more detail see Garth's articles, Interrupt Connections: IRQ and NMI and What Do I Do With the "Mystery" Pins, SYNC, RDY, S.O., Φ1, MLB, BE, and VPB?

cheers,
Jeff
Last edited by Dr Jefyll on Tue Sep 20, 2016 8:12 pm, edited 1 time in total.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Post Reply