Search found 1254 matches

by cbmeeks
Fri Jun 27, 2025 2:16 pm
Forum: General Discussions
Topic: Protecting VIA pins
Replies: 5
Views: 1441

Protecting VIA pins

Sorry if this is a newbie question. Let's say I have a VIA port attached to I/O pins of a micro-controller like ATMega128P such as an Arduino.

The VIA would have port A set as inputs and the Arduino would be outputs.
Now, what would happen if I accidentally set the VIA port A as outputs too and the ...
by cbmeeks
Fri Jun 27, 2025 2:09 pm
Forum: General Discussions
Topic: Video card question
Replies: 18
Views: 4569

Re: Video card question

I haven't read every response but I thought I would throw my $0.02 in.

For my project, I plan on using the Pico9918. Which is a drop-in replacement for the TMS9918. However, it has some extra advantages. First, it's somewhat affordable (relatively speaking) at $35 before shipping. However, it seems ...
by cbmeeks
Fri Jun 20, 2025 12:15 pm
Forum: General Discussions
Topic: NES Controller to VIA Question
Replies: 3
Views: 1579

Re: NES Controller to VIA Question

Very helpful, thanks!
by cbmeeks
Thu Jun 19, 2025 10:23 pm
Forum: General Discussions
Topic: NES Controller to VIA Question
Replies: 3
Views: 1579

NES Controller to VIA Question

I'm connecting two NES controllers to one VIA (65C22).

For those that don't know, the NES controllers essentially have a simple shift register in them. You set the latch pin, then clock it 8 times and you will get the 8-bit value of the buttons.

Since I want to drive two of them, I was thinking ...
by cbmeeks
Fri Nov 01, 2024 8:52 pm
Forum: General Discussions
Topic: Driving a 3-bit DAC from a VIA
Replies: 2
Views: 968

Re: Driving a 3-bit DAC from a VIA

The VIA's SR (shift-register serial port) is confined to using CB2 for data and CB1 for clock. If the clock is controlled by a VIA timer, it will be T2. There are quite a few modes of operation for each; but as is the case also with microcontrollers, the various timers and pins have limitations in ...
by cbmeeks
Fri Nov 01, 2024 7:50 pm
Forum: General Discussions
Topic: Driving a 3-bit DAC from a VIA
Replies: 2
Views: 968

Driving a 3-bit DAC from a VIA

Hello.

I found this schematic on how to drive a simple 3-bit DAC with a VIA (CB2).

http://wilsonminesco.com/6502interrupts/index.html#3.3

However, I was wondering if I could do the same thing with CA2. I'm reading over the data sheet but I'm just not getting how all of the timers work or I'm not ...
by cbmeeks
Fri Nov 01, 2024 7:38 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

Thanks again.

I'm going to start a separate thread on the speaker. I'm not sure if that simple 9 bit DAC will work on Port A so I might have to swap the two ports.
by cbmeeks
Fri Nov 01, 2024 3:49 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

Something like this?

I'm struggling with how the /IRQ is going to work with the three devices. I can eliminate one of the VIA's from the /IRQ and that would leave a UART and VIA (PS/2, LCD). It would be really nice if I could use the PS/2 and get serial interrupts together.

I was going to use the ...
by cbmeeks
Fri Nov 01, 2024 3:44 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

From a VIA.
I plan on putting a shift register between the VIA and the ATMega which uses four pins of Port A. Then the other four pins will control the LCD registers, etc.

As for the PS/2, just straight 8 pins from the ATMega.

Attached is the unfinished schematic so far.

OK. Great!

But hoes ...
by cbmeeks
Fri Nov 01, 2024 3:37 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

Oh, I see what you mean. Yeah, I completely missed that!

Hmm, I will have to think about that as I have already used up all my pins on that VIA. (not totally sure how CA(B)1/2 work).

And yeah, I was going to have the AVR decode the key strokes and send the bytes over so the 6502 only has to read ...
by cbmeeks
Fri Nov 01, 2024 2:48 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

I'm not sure I know what you mean.
by cbmeeks
Fri Nov 01, 2024 12:11 pm
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

From a VIA.
I plan on putting a shift register between the VIA and the ATMega which uses four pins of Port A. Then the other four pins will control the LCD registers, etc.

As for the PS/2, just straight 8 pins from the ATMega.

Attached is the unfinished schematic so far.
by cbmeeks
Fri Nov 01, 2024 2:05 am
Forum: General Discussions
Topic: PS/2 using the VIA's shift register...
Replies: 15
Views: 3067

Re: PS/2 using the VIA's shift register...

Thanks for the information. After some research, I decided to go with an ATMega328P in my design. It will double-duty as a power on reset, debouncing some buttons, resetting chips, and handling the PS/2. :-)
by cbmeeks
Wed Oct 30, 2024 9:13 pm
Forum: Hardware
Topic: Voltage divider for LCD backlight
Replies: 11
Views: 15984

Re: Voltage divider for LCD backlight

OHHH!!!

DUH. That makes a lot more sense. It's literally an LED like any other LED I've connected to breadboards a million times. Obviously, I need to do a little math but more than likely, I will just try some common R values and see what brightness I like. In fact, I have some smaller, cheaper ...
by cbmeeks
Wed Oct 30, 2024 8:25 pm
Forum: Hardware
Topic: Voltage divider for LCD backlight
Replies: 11
Views: 15984

Re: Voltage divider for LCD backlight

although if you're feeding it from batteries and need maximum battery life, a switching regulator operating in a constant-current mode would be good, not throwing away some of the energy by just warming up a resistor.

I like the idea of a LDO voltage regulator.

Maybe something like this?

https ...