6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 2:09 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: 65C22 primer, anyone?
PostPosted: Fri Dec 10, 2021 4:34 pm 
Offline
User avatar

Joined: Fri Dec 03, 2021 2:54 pm
Posts: 11
Can anyone point me to a good 65(c)22 overview?
I’ve read the data sheet a few times, but it’s not really sinking in.

I can input/output on the peripheral ports without any issues, but I’m not clear on how the timers/interrupts/shift registers etc. All work. What does ‘one shot’ even mean?
Do I have to have an interrupt as the result of a time finishing, or can I just have a ‘wait’ function etc.etc.

A few examples would help, but there doesn’t seem to be much out there that has this sort of info.

Any (pointers) much appreciated
(Geddit? :D :D )


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 10, 2021 5:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It's not a primer, but Rodnay Zaks' Advanced 6502 Programming has some 6522 content.
https://archive.org/details/Advanced_6502_Programming

Also perhaps see Chapter 22 of the Advanced User Guide for the BBC Micro:
https://stardot.org.uk/forums/viewtopic.php?t=17242

My feeling is that all the information is in the datasheet, but you might need to see the same thing explained in various ways.


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 10, 2021 5:30 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(And yes, you can choose not to enable interrupts, and just check the appropriate status bit to see if a timer has passed zero.)

One-shot means the timer runs once and then sticks at zero, as opposed to reloading the start count and going around endlessly. (I'm assuming a count-down timer.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 10, 2021 6:00 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
8bitPogle wrote:
Any (pointers) much appreciated
I suggest you acquaint yourself with 65(c)22 datasheets from several different manufacturers. If there's any specific question on your mind, you may find that one manufacturer explains it more clearly than the others. (One of my own favorites is the Rockwell datasheet.)

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 10, 2021 7:19 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Shameless plug here. I don't have a primer specifically on the '22, but a lot of the tips in my "Tip of the Day" topic at viewtopic.php?f=7&t=342 are about the '22, not getting into much detail on each but giving ideas of what you can do with it, in some cases with things to look out for, including subtle differences between brands, and subtle things that may be necessary to get a timer running for example. Some of this is repeated in the 6502 primer, where especially the circuit potpourri page shows a lot of things you can do with the '22, with source code linked. Note that with creative sharing of pins, you can interface lots of things at the same time to a single 65c22, something I don't see other people taking advantage of like you'll find in these pages. You may get more ideas from my workbench computers page. There's a little more in my 6502 interrupts primer, in the portions telling how to set up timers for generating interrupts for a realtime clock or arbitrary waveform generator.

WDC's W65C22S is the only '22 version that has truly CMOS inputs on the ports. Even Rockwell's R65C22 presents a substantial load on the pins in input mode, LSTTL IIRC, which I found out the hard way has caused me problems in some of the things I've done with them. WDC's W65C22S (not N) also has super strong output pin drivers, able to even pull up with 19ma at 4.2V, according to my tests!

After all that, if you have more questions, we'll be happy to answer them, and it might lead to expanding or clarifying the material in the above-linked pages.

_________________
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: Sun Dec 12, 2021 4:28 pm 
Offline
User avatar

Joined: Fri Dec 03, 2021 2:54 pm
Posts: 11
Ben Eater’s latest video focuses on using the timer in the 6522, so that’s helped explain some more of the data sheet.
I can have a play with the timers now I have a better idea of how all the registers interact for timer useage.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 13, 2021 1:26 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
For future reference, I'm guessing that's How do hardware timers work? which, oddly, isn't currently in his "Build a 65c02-based computer from scratch" playlist (although at time of writing, the most recent two videos are about interrupts.)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 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: