A 65C02 Project

For discussing the 65xx hardware itself or electronics projects.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Thanks André for a good page.

Since you mentioned voltage translation:
SPI, Microwire, and dumb shift registers (and, IIRC, SD and MMC cards) have no bidirectional lines, so voltage translation is pretty easy. I have used the cheap and widely available LM339 open-collector quad comparator for projects like these, and just pulled up the output with 4.7K to 5V or 2.7K or 3.3K to 3V. The LM339 itself can be run off of much higher voltages (like 9V or 12V or whatever you have on the board before the regulator), and it's good for several MHz on the clock. Since the input is like an op amp's, you can set the threshold wherever you want.
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?
fachat
Posts: 1124
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Post by fachat »

On a side note...
GARTHWILSON wrote:
I have used the cheap and widely available LM339 open-collector quad comparator for projects like these, and just pulled up the output with 4.7K to 5V or 2.7K or 3.3K to 3V. The LM339 itself can be run off of much higher voltages (like 9V or 12V or whatever you have on the board before the regulator), and it's good for several MHz on the clock.
Maybe you can have a look at this page
http://www.6502.org/users/andre/mischw/probe/index.html and its schematics for a logic probe http://www.6502.org/users/andre/mischw/ ... 0c-sch.png, where I use an LM339, but it simply seems to be too slow for higher frequencies - and "higher" means 1MHz, I couldn't even detect the 1MHz clock on the PET.

Or, after looking at the schematics for the first time in a year, maybe it's the LM339 output circuitry with the (too high?) pull ups R8/R9 that slows it down?

Thanks anyway
André
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Ok, you need a few things. Going left to right:

  1. Your input with the 47K resistors forming a voltage divider is slowing things down because of the capacitance. Time constant for IC4B's input is C*47K/2. If you had 22pF total capacitance from the junction of the two resistors to ground and other things, there's a time constant of over a half a microsecond right there, already making it unsuitable for 1MHz. The IC's input has a little capacitance (the data sheet doesn't tell how much), the socket has some, and your board may have some. You probably wanted to avoid loading the circuit you're probing, but I think you'll have to either go ahead and load it some, like by putting capacitors of 22pF in parallel with R2 and R4, or approach the problem differently and perhaps give up the .8V and 2.0V exact thresholds to get more speed without loading the circuit under test too much.
  2. Putting a small capacitor from the LM339's reference inputs to ground, say .1µF, will speed up the comparators a little.
  3. Your 47K pull-ups are way too high. Same kind of problem as #1 above. Use 6.8K or less.
  4. Put capacitors of .01µF to .1µF from power to ground right at the LM339, just as you would for digital ICs, but connect the 339's power pin to the higher, unregulated supply voltage, not the 5V from the 7805. The part will be a little faster at the higher supply voltage. The input and output voltage ranges can still be 0-5V or lower if you wish.


Make sure you really are using the LM339, not LP339 which is its slower, lower-power brother.

This way, I've gotten over 4MHz with 4049's following the LM339's like you have, and that's definitely enough for bit-banging synchronous-serial interfaces with a home-made 6502 system. Something I'd like to try for higher-speed needs is the LM360 which is much faster.
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?
fachat
Posts: 1124
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Post by fachat »

GARTHWILSON wrote:
You probably wanted to avoid loading the circuit you're probing
Yes, that's exactly the reason. So I guess I did too much of that.
Thanks very much for your tips, I'll try them out as soon as I can!

Back to the thread's topic :)

Cheers,
André
MrLinuxGuy
Posts: 17
Joined: 19 Sep 2008
Location: Bordeaux, France

Post by MrLinuxGuy »

Hello again everyone,

First of all, I'd like to give a huge thanks to Garth Wilson for that detailed thread on serial buses. It really helped me understand the differences and options available.

Sorry for my delay in replying to all, but the last two weeks were the end of my quarter in school, culminating into a very packed week, and then I went on vacation, and had no access to the internet.

Anyways, I want to ask a couple of questions on the display. If i have to draw to a 320x240 LCD screen, I' guessing that it would be best to use a parallel interface between the screen controller and the screen (less clock cycles used to draw). I'm just wondering how fast I will be able to update the screen with RAM that is at 55 ns. I plan on making a text mode and a graphics mode, but I am unsure of how fast I might make the screen update (I would prefer not to have something choppy, but I don't know if this may be possible, considering I will be running between 6-8 MHz).

Also, since I live in an area where there are no electronics resale stores, I'd like some opinions on what LCD display I should ask to be purchased. I've looked at several, but quite frankly, I can;t seem to get the record straight.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Post by 8BIT »

The Apollo Display I used had a line refresh rate of 55.6uS It clocked in 4 pixels at a time. I'd have to go back and look at my code to see what rate I actually clocked it, but I'm sure it was somewhere close to the datasheet recommendation.

You will need to look at the datasheet for the LCD you plan to use in order to determine the recommended refresh rates.

An alternative is to use a display with the controller and display memory built-in. That way, to maintain a display, you do not need to refresh it from the host.

www.earthlcd.com has a large assortment of LCD's and controllers. You may want to research there then try some online surplus stores once you find a model you are interested in.

Daryl
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Post by kc5tja »

DUDE -- thanks for the reference to earthlcd.com. I didn't realize that LCD panels with touch-screen technology (however crappy) can be had for such affordable prices! Egads!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

.
A quote from the second page of this topic, regarding my raster-graphics circuit for use with an analog oscilloscope, mentioned on the first page:
Quote:
Quote:
Complete off-topic, but, any chance you have a collection of pictures of this thing in action?
As I wrote about it, I was thinking that I should take pictures of the screen with it working. I have not done that yet. It's one of many projects lacking from my project pages on this site. Some of the project pages that are there need to be updated.

Ok, finally, a picture:

Image

Actually there's a little more description on previous pages. The beam is too fat and blurry to get higher resolution. It can be made more of a pinpoint by turning the brightness down, but the analog oscilloscope is not really made to be operated in this mode and you kind of have to turn the brightness all the way up and the room lights way down to see it the way it is in the picture. (Edit, 12/14/09: I tried another oscilloscope, and it worked better. It's brighter, and can be scanned faster without losing clarity.)
Last edited by GARTHWILSON on Mon Dec 14, 2009 9:09 pm, edited 1 time in total.
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?
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Post by kc5tja »

Somewhat related to this topic is the oscilloscope demo (as in "demo-scene" from the old 8-bit days):

http://www.youtube.com/watch?v=s1eNjUgaB-g

VERY impressive.
Post Reply