6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 28, 2024 10:22 pm

All times are UTC




Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: CHOCHI E with USB Power
PostPosted: Mon Oct 21, 2013 1:38 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Ladies and Gentlemen, I have a dozen or so updated CHOCHE (rev E) boards with a USB connector for power:
Attachment:
CHOCHI-E.JPG
CHOCHI-E.JPG [ 64.73 KiB | Viewed 2169 times ]


The USB connector makes it much easier to use. There are 3 ways to power the board: USB, an unregulated 5V-6V connector, and a regulated 3.3V connector.

All the software including FIG-FORTH, EhBASIC, C and the examples work without any changes.

If anyone is interested (PM me), the price is still US $25.00 plus actual shipping costs.

If you missed the original CHOCHI thread (http://forum.6502.org/viewtopic.php?f=10&t=2644), this is a complete 45MHz 6502 system with 128K of fast SRAM, a serial port, an 8-bit input and and 8-bit output port. It is based on a Xilinx XC3S50 FPGA and can be reconfigured for other purposes as well. The CHOCHI website is here: http://apple2.x10.mx/CHOCHI/

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 6:28 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
Lookin' good, man!

I can't tell for sure ... did you keep the blinkin' light for basic diagnostic purposes, or get rid of it out of lack-of-need?

Can you show us a rear-view as well?

Mike


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 4:40 pm 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
The LED is still there, upper left corner just below the crystal. It is extremely useful - I can verify that the unit is programmed correctly.

Here is the backside:
Attachment:
CHOCHI-E-BACK.SM.JPG
CHOCHI-E-BACK.SM.JPG [ 78.25 KiB | Viewed 2134 times ]


I try to put a table of pinouts right on the back of my boards. It's much easier than digging through a pile of paper or the filesystem when you need to know how a pin is connected.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 5:55 pm 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Here is a labelled diagram:
Attachment:
parts.png
parts.png [ 174.96 KiB | Viewed 2127 times ]

A couple of new additions:
-a crystal disconnect solder jumper (drop a ball of solder to disable the on-board crystal)
-2 normally unused pins (for 512K SRAM) are routed to 2 pads for optional serial handshaking

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 26, 2013 6:45 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
Hi Enso,

Got the Rev E board up and running this morning. BASIC and FigFORTH work great. I could not get the sbc.bin file to respond, however. After loading, the LED stays on and there is no response from the terminal. Any thoughts?

I may work on some bit-banged SPI code to see if I can get my ENC28J60 board working.

Can you provide the pinout for the JTAG header - I want to be sure my programmer has the same pinout. Also, is there another way to reset the FPGA back to the code boot mode besides power cycling it?

Thanks again!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2013 1:50 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Pin 96 is connected as RESET to the CPU. It is pulled down, active high. You can connect it to a pushbutton with 3.3V on the other end. Check the 'top.ucf' file in the CHOCHI_6502_45_004 source distribution for other pinout information.

The JTAG pinout is standard Xilinx - works with Digilent Spartan3 board. Keeping the same orientation as the CHOCHI insignia, the JTAG pinout is:
Attachment:
JTAG.png
JTAG.png [ 2.06 KiB | Viewed 2056 times ]

Keep in mind that VCCJ for XC3S chips is 2.5V; most newer program cables support this.

I will look into the software issue as soon as possible.

PS - if you want, I can post a customized version of the bitstream that I've been using to bitbang SPI for my SD-card project. It makes it a little easier as the MOSI goes out bit 0 and MISO goes into bit 7 of a dedicated port, so all you need to do is shift right 8 times as you twiddle the clock pin... Let me know.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2013 2:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
Thanks Enso,

I think I will need to take some time and study that FPGA's datasheet and some Xilinx docs too, before I start making modifications to the bitstreams. In the mean time, I'll play around with the board as-is. I will add the reset switch though, as that will be easier than power cycling. My Xilinx programming cable is old - the Xilinx III parallel port cable, which used 5v TTL chips. I will need to update that too.

Nice work on this board!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2013 4:53 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Thanks Daryl.

About reset: it's a little bit counter-intuitive - the computer wakes up with 64K RAM (minus the IO page) with the bootloader magically pre-loaded into the top page. If your code overwrites the bootloader (it's writeable RAM) or the vectors, reset will not help and you'll have to power-cycle. So it may appear as broken sometimes.

As for the Xilinx stuff, it's not too hard to get started. It's pretty easy to reassign the IO pins or change the address of the IO page or change the startup code as a way to get into it.

Let me know if I can help with anything.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2013 4:59 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
Ah, so there's a difference between a cold 'magic' reset and a 'warm' reset?
Is there a way to externally trigger the full 'magic' without cycling the power?
I don't know if it's applicable, but I find myself reminded of the Auto-Start Apple ][ ROM's 'powered-up' byte.

Mike


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2013 5:22 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Well, the simplest thing to do is to write protect the top page, making it impossible to overwrite the bootloader and the vectors. The bootloader could in turn check a 'magic byte' somewhere and vector to some loaded code, and if not, bootload via serial. That way 6502 reset will always run something usable pretty much every time.

The power cycle reset is extremely fast, so the only downside is that eventually the USB connector will break. I have a USB extension box with rocker switches, so I use that to restart.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 29, 2013 5:45 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
I found the problem with the sbc.bin file. It loads from $FC00-$FFFF. However, the bootloader resides at $FF00 and is getting overwritten by the sbc.bin file as it loads - eventually corrupting the bootloader code. It appears that earlier versions had the bootloader load at $0000. Does that sound right?

I recompiled the sbc.bin to go from $FB00-$FE80 (and removed the vectors) and it ran fine.

I am now working on converting the full SBC2OS to 6502 code vs. 65C02. This will include xmodem transfer and EhBASIC.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 29, 2013 8:17 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
My CHOCHI E arrived today, and works just great - I had some initial problems with the fig-forth image, but that appears to have been caused by a corrupted or out-dated file.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 29, 2013 9:46 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Mine arrived today too! A bit of messing with minicom and the raspberry pi, and I got the blinky test, the helloworld and the figforth to work... but ehbasic has some funny ideas:
Code:
Ready
PRINT 22/7
 0.34144E+15

Ready
PRINT 4+5
 5.26515E-07

Ready
PRINT 355/113
 5.43216

Cheers
Ed
(I assume sbc.bin will get an update, given Daryl's comments above)
(BTW, I tried running with two stop bits, but that was less successful than running with one)


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 2:54 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
8BIT wrote:
... It appears that earlier versions had the bootloader load at $0000. Does that sound right?

Bah, of course. I changed the mapping a while ago. Thanks!

Daryl, please send me the fixed source file/binary I will put it up on the website.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 2:57 am 
Online
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Please let me know if any files on the CHOCHI website are not working (sbc is one I know about). It's a never-ending job making sure that the fresh files are up - I have a gazillion versions of everything on my computer...

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: enso and 8 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: