6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Jun 07, 2024 7:30 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jun 24, 2018 3:50 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1003
Location: Canada
This is a simple 8-bit PWM generator that is compatible with 8bit microprocessor buses.

Pulse frequency is 1/256 the clock frequency.

Very little overhead is required for it's use in terms of code or CPU usage. You just need to write a single byte to it whenever you need to change the pulse width. Works like a charm.

Attachment:
PWM.jpg
PWM.jpg [ 222.46 KiB | Viewed 2569 times ]

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 25, 2018 1:47 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3364
Location: Ontario, Canada
Looks good, Bill. :) And it's nice that your machine has slots that can very readily accommodate an accessory like this.

Quote:
Pulse frequency is 1/256 the clock frequency.
As a timebase it uses the bus clock, is that right? The logic you're using has a lot of headroom, speed-wise. If someone wanted to use a higher clock frequency it'd be very easy to switch to using a can oscillator as a timebase.

_________________
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: Mon Jun 25, 2018 2:49 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1003
Location: Canada
Dr Jefyll wrote:
Looks good, Bill. :)
Thanks.

Quote:
As a timebase it uses the bus clock, is that right?
Yes, that is the case in my implementation. It suits my needs right now, but I can envision wanting to design one with a programmable clock. My use so far has been with a 1.8432MHz version of my system - so the pulse frequency is 7.2KHz.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 25, 2018 6:36 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
Nice.
You may use /RCO and /P=Q as pulse outputs additionally. /RCO is "0" when the counter = $FF. /P=Q would always precede P>Q by one clock. Perhaps useful as a trigger?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 26, 2018 2:26 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1003
Location: Canada
GaBuZoMeu wrote:
Nice.
You may use /RCO and /P=Q as pulse outputs additionally. /RCO is "0" when the counter = $FF. /P=Q would always precede P>Q by one clock. Perhaps useful as a trigger?

Yeah, you could put a 74LS74 in there and have nice divide by 512 and 1024 square waves for ... whatever you'd need them for.

Using a 74AS885 would offer some advantages over the 74LS682, not the least of which is a simpler layout.

_________________
Bill


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

All times are UTC


Who is online

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