GARTHWILSON wrote:
First, I definitely like the size idea, although I might go for an ABS plastic box instead, as ABS is wonderful for milling at home with a Dremell tool and needle files, for slots, odd-shaped connectors, windows for display and keypad, etc., and for gluing.
totally get that, and see something like this as a 'user modification'. something at a Chain Store for under $2 would be okay I guess.
Altoids cans are 'traditional' and cheap and ubiquitous.
Quote:
wayfarer wrote:
GARTHWILSON wrote:
If all you want is ...
Ah, its not really ...
Is the 32.768kHz oscillator can feeding the system clock? That would be awfully slow, and you'd only get about 8K instructions per second, more or less depending on what you're doing.yes, on my breadboard though. The logic ICs are in Narrow form, and not too big, its a simple circuit and yes, once you add the gate hardware to select notes (its likely to just be 3 tones or so) which is not a lot of read/write to turn tones on or off every 1/8th of a second or so... Mind you, Im just planning to do this on the breadboard, because I dont like a potentiometer based variable clock, I like stepping through a series of discrete choices, that circuit will be fun to build, I want to use TimeKeeper RAM, which has an RTC in MMIO addresses. so to get more used to that, I want to start with an RTC of some kind, there are several. If I can get TK-RAM, I'll use it 'in the can', for the BB, I want to stay simple. One of the first projects I intend to do, is just an RTC decoding to some 7-segment displays or such. Its good basic I/O and easy to see errors along the way.
So, because I am using the RTC and BB clocks off the 32768 can for now, and I need to breakout the frequency in a set of resettable hex or octal flip-flops, so I can get a clean , 1, 2, 4 or 8 Hz breadboard clock, I get these mentioned 'C notes' for free.
still, for just beeps and boops, the 6522 is probably better use of real estate and does a lot more tones. seems like the 6522 can pretty easily double as a single voice PC speaker driver too...
Quote:
Will that do the job? ... The exception on the RTC is if you want the RTC to keep running when the computer is powered down, with something like a 2032 lithium coin-cell battery running the RTC. An IC like that will usually be in I²C (probably not SPI, because it doesn't need SPI's speed), and you'd probably interface it by bit-banging the I²C through the '22.
yeah the TK RAM has a built in battery, its pretty cool and you can get a 2k or 8k chip for like $5, maybe $10 for the bigger ones. It gets pretty expensive at a point, users can choose to have more RAM, Im just wanting 'enough', cheap and not in conflict with 6502 vectors (one of the chips date or time values is right over the 6502 hardware vectors in $FFxx, so you cannot use that size.
I "do not like" either SPI or IIC, I am slowly opening up to various serial protocols, it makes sense in certain contexts and as I explore 1- and 2- bit computing. Still, I prefer parallel MCU access. I do not understand SPI RAM. Why is this exists?
Quote:
Quote:
The 6522 would fill in there, still it would increase cost and complexity to add it.
That's the only thing I have against the '22. When we were selling a product with an R65C02 and R65C22 in 1994-2007 or so, they cost us only about $2. Today they're $10, in a day when you would think ICs' prices would be dropping.
I might add one, it does do a lot... its really hard to justify in such a small device, with virtually no intended I/O
Quote:
Quote:
I am very torn on adding the 6522...
If size is an issue, you can get the PLCC package like BDD said, or even smaller, the PQFP. The only bug in the '22 is regarding using the synchronous-serial port with an external serial clock. It won't affect most users. You'll always find however that you'll wish for more I/O than you had planned for—at least I do.
I tend to agree. to what shall I interface the altoids can to?
I am reading the 6522, its a really powerful port expander and has a ton of functionality, with some tricks, you can run several devices off each port...
great timers... I think if I understand them, if you wanted you could take the lower bits of T1 (or T2?) and write those to an address with a latch and each 'pin' on that address would have the corresponding frequency, as each pin would change accordingly to output a lot of 'flat C notes', how often you refreshed those would create your playback/sample rate. Combined with the other Timer and maybe some other bits for noise, you can build a rather basic sound chip with several 'Cs' a single voice in any other note and a bit of noise. Mixing this can be done flat and sent to an op-amp. This would actually be 'good' PC speaker and a 'very bad' PSG. Still, I think you could pull off some basic melody and tunes with a 6522...
Id really rather have that 76489
Quote:
Quote:
It can 'do a lot' yet requires overhead from the CPU, unlike using a MCU you can program a loop or two for and have it run its own code.
You'll still have to have the '02 tell the µC very specifically what to do; so you'll have some programming either way. As far as generating beeps though, there's a minor amount of setup, and it will produce the tone without further attention from the processor until you tell it to stop. In that sense, it's like the '22 is running a loop internally.
yeah reading the data sheet, it can certainly meet and exceed the pinouts on a binary divider...
I think you can get that out of a 6522 as well, if your source clock is set up to be 32768 (or another good multiplier, such as NTSC colorburst which will grant 432Hz or "some people's" A7 evenly), you take the binary counter especially the lower byte, output that to I think a Latched Register that can be sent to a speaker, the refresh is the sample rate (should be twice highest note) and you AND that with different gates to play any of those 8 notes...
so, not only can I use the 6522 the way you mentioned, I think I can get it to do what I am talking about as well, with about the same amount of extra hardware... wasnt one of those 6522 bugs solved by a flip-flop? if so, the having a multi-gate IC, means if you have any left over, if yo have a counter running at all, you can break out a few beeps and boops, and only require a read/write operation during an update loop, and the instructions to turn notes on or off as needed. you would have your say, octal flip flop (on a board bigger than this) and use a few channels on it for a few extra notes.
so, the VIA can be a really crumby sound chip too, in more ways than one. I'll look further into this later. Beyond the single voice at any note you mentioned, you can get 'reference notes' pretty easy too.
Quote:
Quote:
(connecting to devices through a 9-Pin DIN or USB sounds 'educational')
How 'bout a DB-9? DIN is not very standard in the US (I think it was much more common in Europe), and my experience with round DIN connectors has been that they're kind of delicate, with the shells easily splitting or slipping off. A DB-9 was quite common for RS-232 (TIA-232-F).
that is exactly what Im thinking of and called it the other thing.
yes, an rs-232 serial port. I can cram one on here. Its in the images I am posting below. I have no idea, what I would connect this to.
USB sounds a lot more 'current user friendly', while the DB-9 is pretty cool and allows a lot of fun stuff, I have no idea what anyone would do with it these days, other than get in trouble...
Quote:
Quote:
I will possibly need a way to flash a ROM or load files, I figured Id use a memory card or just USB if I add it,
or just flash the ROM and use that,
Further down, you say 8K or 16K ROM. AFAIK, flash does not come in anything below 64K. That's not to say you need to use the whole thing of course; but if you use EEPROM, you don't flash EEPROM, because it's not flash memory. You just program it.
I was generically referring to both options and any others... 'encode' or 'program' is probably correct, Write to ROM is an oxymoron...
So, as I am not certain what form of Hard Storage, if any will be used, if it will be flash, a ROM chip, a ROM space on an MCU, an SD card, etc
what is the most generic term for 'make bits on chip align correctly'?
I do not know if adding software or changing programs will be possible without diassembly of the device... Im leaning toward an MCU with built in usb, or maybe a USB IC with charging and such.. I'll look into it
Quote:
Quote:
Im not sure if Im going to put an MCU on here to handle RAM/ROM and I/O yet, probably not, pin count is a concern here and Im not a big fan of SPI or I2C, Im more of a parallel guy I guess. idk, Im looking into it though, several chips I like use IIC or SPI (I think I prefer SPI maybe), though I still want to write to them directly, or have an MCU do that.
I²C and SPI serve different purposes, and many parts will be available only in SPI and many others only I²C. The ones where transferring files or other large amounts of data will be SPI, because I²C is just too slow for that.
I just have no room on this board to do much, even with the smaller packages.
On a full size system, you might have enough stuff for all of this... I am not certain I will have much if any devices to connect to, even ICs here...
Anything I build beyond an absolutely minimal system here, will really be done on another project.
Quote:
Quote:
When I think of system level design, and I get away from protocols, wires and timing, I think:
CPU (runs programs and OS calls)
MCU (runs the OS/board and puts everything else, ito RAM locations/'vectors' so the CPU can read them)
<snip>
...
We tend to use what we're familiar with. I've looked int the PIC18's a lot, but not actually used one yet, and I think my next step up will be bigger, to the PIC24's. I have brought many products to market with PIC16's though, and an super familiar with them and have a lot of code I've written for them that I recycle to make each subsequent project easier. Still, in 2021 I had to re-develop something to work on a PIC16 after I had done it a couple of years earlier on my workbench computer with the 65c02. Even though I had the previous work to go on (ie, the same thing working on the 65c02), doing it again for the PIC16 was much, much harder.
Id have to check the chart again, the PIC24 looks good for the 65816 in terms of similar data/address size, it can do a lot as a companion chip... the PIC16 or 18 is similar enough to the 6502, its not to recreate what a 65xx does, its to take loads off its back and organize whats coming in and do what it can
_____________________________________________________________________
barnacle wrote:
In ye olde days, there were a number of chips available which took in a 2MHz clock (or thereabouts) and divided it by some interesting numbers to give the twelve notes of the western scale. Many electronic keyboard instruments were designed using one of those and twelve binary dividers to generate the basic frequency for each key. It's possible they're still available somewhere... MK50240 sounds familiar, or M8071 rings a bell. There are probably others; these look to be going for very silly prices online used.
Neil
if these were not stupid expensive, this is basically what I was talking about doing, yet in my head, you would select on if the Reference notes and use that to create the octave from its frequency, these are basically the same things...
_______________________________________________________________________________________
Attachment:
imagepcb-footprint.png [ 40.17 KiB | Viewed 978 times ]
so this has 2x PLCC 44 sockets, a couple of placeholders for RAM and ROM, an oscillator can, a power jack, an RS-232 DB-9 Male(?), and a place for the ribbon to go to the screen, an 2 pin header for the speaker, it needs pins in for the buttons and an on-off switch, still its just to see how things fit.
I think Ill redraw tomorrow with a USB and room for the 76489 PSG instead... I simply have no real reason to include the 6522 on this design. (except I will probably use it later). For sound, Id use a PSG... I have real need for I/O on this.
CPU talks to RAM, Talks to Screen, Talks to sound IC, reads ROM, Reads and Writes to RAM, Reads 8 buttons for input...
Thats all it does I think, until you add some kind of storage (might not really change much or need a 6522), or I use USB (a USB chip is better) or a serial/rs-232 port...
anyway, yes you can fit one on here, though I am 'of a mind' that the 6522, and the db-9, are in 'user extension space' and I am more likely to add a headphone jack and a better sound chip personally, others might want a UART, or a better video chip, or more RAM or Storage, maybe an SD card slot instead...
Attachment:
image_board_parts_tinker.png [ 108.89 KiB | Viewed 978 times ]
6502 on left, RAM in center, ROM on bottom left, the thing in middle left is the connector for the screen, it doesnt look right call it a place holder. 6522 on right, , Oscillator, power jack leads and a serial port under that. The Caps are for decoupling. Its not really right, it does offer some clarity on how much space there is...
I am very torn on the 6522, and am now very interested in A) putting one on here to gain experience, or B) building a desktop computer with one in it later...
idk, I want to keep scope down, make this as hobby friendly and approachable as possible, and be 'finishable' and 'startable' for young people, old people, people that have shaky hands or are bad eyesight, etc. This should really have a focus on 'what can you do with it' after its built, something missing out there in many places.
6502, RAM, ROM, RTC, Screen, Buttons, Speaker, Battery.
Adding a PSG would be 'real nice'. Adding a 6522 lets it...?