Cmod + 65816

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
Post Reply
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Cmod + 65816

Post by Rob Finch »

I've got this project going on in the background with my other work to interface a CmodA7 to a 65C816. It doesn't quite work yet. On reset the blue LED lights up indicating the cpu is accessing the ROM, but it doesn't light up another led like it's supposed to or send a power on message. The cmod contains a high-speed uart (921600 baud), ram, rom.
Block Diagram
Block Diagram
Photo of system
Photo of system
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Cmod + 65816

Post by barrym95838 »

921600 baud seems (for this old-timer) to be rather ambitious for an initial goal. Definitely keep us posted, and provide additional info if you decide to seek any advice from the resident hardware gurus.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: Cmod + 65816

Post by Rob Finch »

Quote:
921600 baud seems (for this old-timer) to be rather ambitious for an initial goal.
It’s serial through USB so it can be fast. I’d go with an even higher baud rate but 921600 was the highest listed for the device in Windows. The rate is high enough that simple text screen can be emulated through the serial. 921k is about 91kB per second. Which is about 3k characters at 30Hz refresh rate.
The ‘816 isn’t actually transmitting directly through the port. Instead it writes to dual port memory. The other side of the dual port memory is connected to the uart transmitter in a DMA fashion. The DMA just loops around repeatedly through the transmit buffer. So, the transmit buffer somewhat resembles a text video buffer.
There’s a program running on the PC workstation that can pick up this repeated transmission and display it in a window. The baud clock (14.7MHz) is about 0.25% too slow but it seems to work okay.
HelloWorld
HelloWorld
HelloWorld.png (3.74 KiB) Viewed 1505 times
The "hello world" is hard-coded in the transmit at the moment.

The cpu is powered by about 3v and clocked at 6MHz. Two power diodes are used to drop a 4.5v USB power down to about 3v.
Found two bugs yesterday, the reset line going to the cpu was active high and it should be active low, and the ready line needed a pullup resistor. Initially I forgot that the ready line is bi-directional on the ‘816. Then I made it a tri-state I/O on the FPGA but forgot the pullup.
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: Cmod + 65816

Post by Rob Finch »

I hooked up the logic analyzer to the inputs from the 65c816 and found out it's mostly garbage. It looks like I bought bad/fake chips. Unless there's something else wrong with the system.

From the logic analyzer, the vector pull line doesn't go active on reset, and the address bus is all ones. I've seen it reset to $FFFC and flip back and forth between $FFFC and $FFFD doing a vector fetch non-stop, but with no active vector pull. This is the second chip I tried. The first one didn't work at all.
Logic analyzer trace
Logic analyzer trace
tingo
Posts: 11
Joined: 07 Aug 2018
Location: Oslo, Norway

Re: Cmod + 65816

Post by tingo »

I didn't know what a Cmod A7 was, so I googled it: https://store.digilentinc.com/cmod-a7-b ... ga-module/
So it's an Artix-7 (plus more) on a breadboard module.
--
Torfinn
Post Reply