W65C816SXB

Let's talk about anything related to the 6502 microprocessor.
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Howdy...

I agree the board is pretty bare bone and it would be nice to have some kind of VGA or HDMI output to connect it to a monitor...
More memory would be nice as well, if WDC sends me the schematics, I'll probably look into hooking some up on a different bank.

I'll download the latest version tonight and give it a try, did you change the baud rate to 115200 as well ?
This was just a lucky guess, I have a theory of why it works at 115200 baud but need to see the schematics first to get it confirmed... ;-)
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: W65C816SXB

Post by BitWise »

Alamorobotics wrote:
I agree the board is pretty bare bone and it would be nice to have some kind of VGA or HDMI output to connect it to a monitor...
More memory would be nice as well, if WDC sends me the schematics, I'll probably look into hooking some up on a different bank.

I'll download the latest version tonight and give it a try, did you change the baud rate to 115200 as well ?
This was just a lucky guess, I have a theory of why it works at 115200 baud but need to see the schematics first to get it confirmed... ;-)
I have design for a 2x512K SRAM board on the XBUS connector resady to send to China for manufacture. I'm thinking of connecting mine to a MMC IDE adapter and an FTDI EVE module with a 5' TFT display via bit bashed SPI from the VIA.

My code runs at the highest 'official' speed on the 6551, 19200. Your changes enable the 16x mode on the baud rate generator but I can't see how you get 115200 baud. It should be much lower.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

That board sounds interesting, you cannot go wrong with Extra memory... ;-)
I got to check out the FTDI EVE modules, looks great.

So my theory is about how RxC is connected, if it is connected to the crystal somehow, it makes sense since I found this in the W65C51N doc,
Receiver Clock Source (Bit 4)
This bit controls the clock source to the Receiver. A 0 causes the Receiver to operate at a baud rate of
1/16 an external clock. A 1 causes the Receiver to operate at the same baud rate as is selected for the
transmitter.

But there has to be some kind of circuitry avoiding the conflict between this pin being output or input.

Anyhow, I don't have a schematic so it's only a guess... ;-)
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: W65C816SXB

Post by BitWise »

Alamorobotics wrote:
So my theory is about how RxC is connected, if it is connected to the crystal somehow, it makes sense since I found this in the W65C51N doc,
Receiver Clock Source (Bit 4)
This bit controls the clock source to the Receiver. A 0 causes the Receiver to operate at a baud rate of
1/16 an external clock. A 1 causes the Receiver to operate at the same baud rate as is selected for the
transmitter.

But there has to be some kind of circuitry avoiding the conflict between this pin being output or input.
As far as I can see RXC is only connected to a pin on the ACIA connector and nothing else so is probably floating.

In your configuration the ACIA is somehow drawing from the the oscillator crystal (1,843,200Hz) and passing it to the /16 divisor to achieve 115200 baud (1843200/16 = 115200). I don't think its an intended usage, more of a lucky side affect.

My SRAM board looks like this:
sxb-memory.png
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Howdy...

Looking back at my code, I'm not clearing bit 4 so it cannot be an external clock anyway.
The doc say that if we clear bit 0-3, no divisor is selected, maybe the 1.8432 MHz is passed to the final clock divider (divided by 16) and we get 115200 baud.
Guess a lucky coincidence... ;-)

Anyhow, nice board.
Let us know how it works and the Bill of Materials, I might want to make one as well...
That would be a real push for the w65c816sxb board...
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: W65C816SXB

Post by floobydust »

The W65C51 documentation seems pretty clear. The lower 4 bits of the Control Register selects the baud rate based on internal divisors. If the lower 4 bits are zero, then it simply divides the input clock by 16 and uses this for the transmit clock. Using the standard 1.8432 MHz clock rate, you can get a baud rate of 115,200. Bit 4 of the register controls the receive clock source. If set to 1, it uses the output from the baud generator and also drives the RxC pin as an output, which matches it to the transmit clock. It bit 4 is set to zero, it will use RxC as a clock input and divide it by 16 for the receive clock, which makes it independent from the transmit clock.

As a simple test, I changed my Control Register config from $1F to $10, re-initialized the chip and changed the terminal program from 19,200 to 115,200 and everything works fine.
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Had some fun over the weekend,

viewtopic.php?f=1&t=3510
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: W65C816SXB

Post by BitWise »

I've updated the source for the hacker program on GitHub. This latest version replaces the software delay with code that uses VIA2's Timer2 in one-shot mode to time serial transmission. The default code and timings are for 19200 but should be easily changed for 115200.

I've also added more documentation to project site and rearranged the I/O code a bit.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Thanks for keeping the project alive, I will have a look at it tomorrow...
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Works great...

I decided to stay at 19200 baud since it works fine and really is fast enough... :D
Is there a way to manually enter data or is XMODEN the only option ?

I got the schematics from WDC and have been playing around with the board.
David said they are looking into posting the schematics on the http://wdc65xx.com/ site.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: W65C816SXB

Post by BitWise »

Alamorobotics wrote:
Works great...
Is there a way to manually enter data or is XMODEN the only option ?
At the moment XMODEM is the only option. What else do you think it should have? S19 is quite easy to implement.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

I was thinking something very rudimentary like a W command or similar.

Code: Select all

W65C816SXB-Hacker [15.11]
.?
B bb           - Set memory bank
E              - Erase ROM area
G [xxxx]       - Run from bb:xxxx or invoke reset vector
M ssss eeee    - Display memory in current bank
R 0-3          - Select ROM bank 0-3
X xxxx         - XMODEM upload to bb:xxxx
.W 1000 00 01 02 03
Would write 00, 01, 02, 03 starting at $1000

Right now I don't have a practical application, but it would be a nice feature if there is an easy way of doing it...
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: W65C816SXB

Post by BigDumbDinosaur »

Alamorobotics wrote:
I was thinking something very rudimentary like a W command or similar.

Code: Select all

W65C816SXB-Hacker [15.11]
.?
B bb           - Set memory bank
E              - Erase ROM area
G [xxxx]       - Run from bb:xxxx or invoke reset vector
M ssss eeee    - Display memory in current bank
R 0-3          - Select ROM bank 0-3
X xxxx         - XMODEM upload to bb:xxxx
.W 1000 00 01 02 03
Would write 00, 01, 02, 03 starting at $1000

Right now I don't have a practical application, but it would be a nice feature if there is an easy way of doing it...
Starting with Jim Butterfield's Supermon, Commodore M/L monitors have had the > function to "poke" data into RAM (I don't recall if the original PET monitor had that capability). For example:

Code: Select all

> 2000 01 02 03 04
would write the consecutive values $01 $02 $03 $04 into RAM, stating at $2000. The byte values can be in any of the four supported number bases.

In Supermon 816, I extended that function to allow the entry of a character string, as well as numeric values:

Code: Select all

> 002000 'This is a test!
would write This is a test! into RAM starting at $002000. The maximum number of bytes that may be entered is 32, whether as numeric values or as a character string.

I use this capability all the time with my POC unit to test code with different data.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: W65C816SXB

Post by BitWise »

I've added a simple byte write command that automatically prompts for the next byte. There is also an experimental S19 loader but its too late here to rigorously test it.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Alamorobotics
Posts: 54
Joined: 30 Oct 2015
Location: Sweden

Re: W65C816SXB

Post by Alamorobotics »

Howdy...

Just to answer an old question in this thread...
The schematics have been posted on WDC65xx, http://wdc65xx.com/support/documentation/

I'm off later this week and will have a look at the new version...
Post Reply