6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 09, 2024 10:44 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Feb 20, 2013 7:38 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Hi guys,

I just stumbled across a pair of W65C134S samples that I received way back in 1997 and I'd like to try and design a simple SBC with one of them. My goal is to design a small but capable SBC with 32kB RAM and a 128kB emulated disk on serial eeprom. Since I've never built a SBC before and I haven't found any example W65C134S SBC projects for reference, could I impose on you kind folks for guidance, please?

The W65C134S is an interesting beast. It has a built-in Monitor ROM and a handful of built-in peripherals, including an ACIA. Now, if I'm interpreting the documentation correctly, I should be able to bring it "up" in a minumum configuration with just a 32768 Hz crystal for 'CLK', a 2.0 or 4.0 MHz crystal for 'FCLK' (fast clock), a 'reset' circuit, a few passive components, and a usb-to-serial (ttl level) adapter. Mind you, this minimum configuration will only have 192 bytes of built-in RAM which is mirrored between the ZP and Stack at $0040..00FF and $0140..01FF, but I can do just about anything I want with the RAM using Monitor commands via a terminal program on my PC.

Question 1: Can I use a PIC to generate FCLK?

I've got a 32768 Hz watch crystal but I don't have a crystal in the correct range for FCLK. The WDC evaluation boards use "can" crystals so I'm thinking I should be able to use a TTL level clock signal from a PIC, yes, no? I know you're thinking I should just spring for a crystal but I'd rather use what I have at hand, and besides, I'm hoping I can use the little 8 pin PIC for another function on the SBC (read on).

Question 2: Generating a PHI2 qualified /WE signal for RAM

After I get the board up-n'-running in the "minimum configuration" mentioned above, I'd like to add a 32Kx8 SRAM. I think that will involve setting a register bit in the W65C134S to turn on the built-in chip select output for the RAM chip, and if I'm not mistaken, I need to develop a /RD signal and a PHI2 qualified /WR signal for my RAM chip just like BDD does in his POC board design. Is this correct? If so, can I use the CLC (Configurable Logic Cell) in my PIC?

As far as I know, Microchip hasn't published any specs for the CLC modules so I don't know what kind of propagation delay I'd have. However, if the CLC is fast enough, I would have the read/write logic and the FCLK source all on a little 8 pin PIC, which would be kinda' cool.

TIA, guys... Cheerful regards, Mike

Attachment:
CLC #1.png
CLC #1.png [ 11.74 KiB | Viewed 920 times ]


Attachments:
W65C134S v1.png
W65C134S v1.png [ 48.12 KiB | Viewed 920 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 20, 2013 8:34 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Michael wrote:
Question 1: Can I use a PIC to generate FCLK?

I've got a 32768 Hz watch crystal but I don't have a crystal in the correct range for FCLK. The WDC evaluation boards use "can" crystals so I'm thinking I should be able to use a TTL level clock signal from a PIC, yes, no? I know you're thinking I should just spring for a crystal but I'd rather use what I have at hand, and besides, I'm hoping I can use the little 8 pin PIC for another function on the SBC (read on).

It looks like you can tell the PIC how fast you want its internal clock to run, and then you can use CLKOUT to output 1/4 of that frequency. In my 10 minutes looking at the data sheet, I did not see what the resolution is on the speed you set it to run at, if you can run it at 16MHz so it outputs 4MHz. Note however that its frequency may not be exact enough to run RS-232 on (if it gets used for that), unless you also give the PIC a crystal reference. They say you can get it to 1% which may work, but I don't know yet if it can hold 1% across the temperature range.

Quote:
Question 2: Generating a PHI2 qualified /WE signal for RAM

After I get the board up-n'-running in the "minimum configuration" mentioned above, I'd like to add a 32Kx8 SRAM. I think that will involve setting a register bit in the W65C134S to turn on the built-in chip select output for the RAM chip, and if I'm not mistaken, I need to develop a /RD signal and a PHI2 qualified /WR signal for my RAM chip just like BDD does in his POC board design. Is this correct? If so, can I use the CLC (Configurable Logic Cell) in my PIC?

As far as I know, Microchip hasn't published any specs for the CLC modules so I don't know what kind of propagation delay I'd have. However, if the CLC is fast enough, I would have the read/write logic and the FCLK source all on a little 8 pin PIC, which would be kinda' cool.

Yes, that CLC that allows you to set up logic functions without their having to go through instructions is really neat! So is the numerically controlled oscillator. I didn't see any propagation-delay specs either.

About the EEPROM: I've used the 24-family serial I²C ones, and I like them, but you can get much higher density and higher speed with SPI ones. Right now I'm working with the 25VF032 which is 4Mx8 in an SO-8 package.

_________________
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  
PostPosted: Fri Feb 22, 2013 4:49 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
GARTHWILSON wrote:
Michael wrote:
Question 1: Can I use a PIC to generate FCLK?

I've got a 32768 Hz watch crystal but I don't have a crystal in the correct range for FCLK. The WDC evaluation boards use "can" crystals so I'm thinking I should be able to use a TTL level clock signal from a PIC, yes, no? I know you're thinking I should just spring for a crystal but I'd rather use what I have at hand, and besides, I'm hoping I can use the little 8 pin PIC for another function on the SBC (read on).

It looks like you can tell the PIC how fast you want its internal clock to run, and then you can use CLKOUT to output 1/4 of that frequency. In my 10 minutes looking at the data sheet, I did not see what the resolution is on the speed you set it to run at, if you can run it at 16MHz so it outputs 4MHz. Note however that its frequency may not be exact enough to run RS-232 on (if it gets used for that), unless you also give the PIC a crystal reference. They say you can get it to 1% which may work, but I don't know yet if it can hold 1% across the temperature range.

I can run the PIC at 8 or 16 MHz to get a 2 or 4 MHz output for the W65C134S "fast clock".

You're right, of course. I may have to use a crystal.

Quote:
Quote:
Question 2: Generating a PHI2 qualified /WE signal for RAM

After I get the board up-n'-running in the "minimum configuration" mentioned above, I'd like to add a 32Kx8 SRAM. I think that will involve setting a register bit in the W65C134S to turn on the built-in chip select output for the RAM chip, and if I'm not mistaken, I need to develop a /RD signal and a PHI2 qualified /WR signal for my RAM chip just like BDD does in his POC board design. Is this correct? If so, can I use the CLC (Configurable Logic Cell) in my PIC?

As far as I know, Microchip hasn't published any specs for the CLC modules so I don't know what kind of propagation delay I'd have. However, if the CLC is fast enough, I would have the read/write logic and the FCLK source all on a little 8 pin PIC, which would be kinda' cool.

Yes, that CLC that allows you to set up logic functions without their having to go through instructions is really neat! So is the numerically controlled oscillator. I didn't see any propagation-delay specs either.

If I had a scope I would be happy to do some experiments to characterize CLC performance. In the mean time, I'll just try it and see if it works.

Quote:
About the EEPROM: I've used the 24-family serial I²C ones, and I like them, but you can get much higher density and higher speed with SPI ones. Right now I'm working with the 25VF032 which is 4Mx8 in an SO-8 package.

I've seen those and they're pretty cool but I'd like to stay with 5v DIP units for now which pretty much limits me to the lower density units.

Take care... Have fun... Regards, Mike

<added>

I'm starting to wire up a W65C134S test board...

Image


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 22, 2013 7:09 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Michael wrote:
GARTHWILSON wrote:
About the EEPROM: I've used the 24-family serial I²C ones, and I like them, but you can get much higher density and higher speed with SPI ones. Right now I'm working with the 25VF032 which is 4Mx8 in an SO-8 package.

I've seen those and they're pretty cool but I'd like to stay with 5v DIP units for now which pretty much limits me to the lower density units.

You can use the SOIC-to-DIP adapters like this one from Jameco:

Image

That's what I'm using with the 25VF032. I'm also using it on a 5V system, with an LM339 for logic-level conversion as shown at http://wilsonminesco.com/6502primer/pot ... HI_V_LOGIC . You could also use the 74LS07 or the 74LVXxx family for logic-level conversion. If you want purely 5V though, I was going to suggest the AT45D161 2Mx8 which I have a couple of here that I'll never use, but it looks like it's no longer made. There's the 45DB161 (and denser brothers), but it's 3.3V.

I can't remember if I mentioned this before, but for an I²C port, let me recommend our I2C-6 pinout. Daryl has EEPROM modules available in this pinout, and uses the same pinout on his SBC-4 computer.

_________________
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  
PostPosted: Mon Feb 25, 2013 6:21 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Thanks for the info', Garth. I saw the thread with the I2C specification you mentioned. Very nice!

New question, if I may?

While reading the W65C134S Monitor ROM Reference Manual, Release 2.0 (February 7, 1995), I noticed that the serial routines use hardware hand shaking. Does anyone know if I can bypass the input signal from the PC host by tying the NE47 line (pin 61) on the W65C134S to ground?

TIA, Gentlemen. Cheerful regards, Mike


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 25, 2013 8:09 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Quote:
While reading the W65C134S Monitor ROM Reference Manual, Release 2.0 (February 7, 1995), I noticed that the serial routines use hardware hand shaking. Does anyone know if I can bypass the input signal from the PC host by tying the NE47 line (pin 61) on the W65C134S to ground?

If NE47 is truly set up for negative-edge interrupt, I think you would want to pull it up to Vcc through a resistor. I don't find anything in either the data sheet or the ROM reference manual about NE47 being used by the serial routines though. What did you find? How is it used?

_________________
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  
PostPosted: Mon Feb 25, 2013 8:36 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Well, I have the older 1995 ROM Reference Manual but the same info' is on page 15 in the new ROM Reference Manual on the WDC web site;

Attachment:
w65c134s ROM manual.png
w65c134s ROM manual.png [ 42.25 KiB | Viewed 832 times ]


Last edited by Michael on Tue Feb 26, 2013 5:21 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 25, 2013 9:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
So it looks like a CTS input. If you make it look like the other end can always accept data, the '134 might send data that will be lost because the other end is in fact not ready. It seems like that should never happen if the other end is a multi-GHz PC, but I've seen such PCs ignore the keyboard for several seconds, a problem our son never had on a 1MHz Commodore 64 with GEOS when writing papers in junior high, so I don't know.

_________________
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  
PostPosted: Mon Feb 25, 2013 9:15 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
I was hoping I could just tie that pin low and not worry about it. I haven't looked at the Monitor ROM listing yet. Perhaps the Monitor is just testing that pin for a low level rather than a negative going edge?

Thank you, Sir... Back to wiring up the board...

Cheerful regards...


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 26, 2013 7:37 am 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
Michael wrote:
I was hoping I could just tie that pin low and not worry about it. I haven't looked at the Monitor ROM listing yet. Perhaps the Monitor is just testing that pin for a low level rather than a negative going edge?


There's a long tradition for hardwiring handshaking signals, so I doubt that these are edge-sensitive. That said, handling these correctly only requires some extra level shifters (and maybe not even that, as there is (I think) cables available that interfaces USB to 3.3V serial... some FTDI thing, I guess.)

Of course, if you actually have real RS232 ports, you'll need real drivers, too :-)


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 26, 2013 8:10 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
No, I'm not using "real" RS232 ports. Instead I usually use a small USB-to-Serial (TTL level) board with PL2303 or CP2102 chipset (less than $3 on ebay, including shipping) or a Chinese clone of the Nokia CA-42 USB-to-Serial (TTL level) cable (also less than $3 on ebay, including shipping). I replace the cell phone connector on the CA-42 cable with a 3.5mm stereo plug. Both adapters allow me to add USB serial connectivity to any project by simply adding a 3 or 4 pin header or a 3.5mm stereo jack to my project boards.

You can just see one of those adapters plugged into my laptop near the top of this picture which is being used to power and connect a PIC prototype board in the foreground with my laptop.

Regards, Mike


Attachments:
Proto LCD.jpg
Proto LCD.jpg [ 122.09 KiB | Viewed 809 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 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: