adrian ([info]erikarn) wrote,
@ 2006-01-01 22:47:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
SID board: update
* two SID chips are now wired up and working
* LCD code mostly debugged: they're slow pieces of crap to talk to
* rotary encoder mostly debugged: they're annoying to poll. I can easily rewire the connector to wire both to seperate interrupt pins and do them off interrupts which I may end up doing.

The main problems seen so far:

* having to talk at 1mhz to the SID and even slower (!) to the LCD means my 4mhz/8mhz microcontroller will spend a lot of time executing NOP instructions ..
* .. unless I cleverly start interleaving work with the SID/LCD updates.
* I'm out of pins to implement the keypad and I have no pins whatsoever to implement LEDs. The plan is to steal a couple of leftover bits for a latch for 8/16 LEDs and a bit to implement "keyboard" enable, doubling up on the SID databus. I can't use the LCD data bus because the LCD doesn't do high-impedance: it doesn't have a "chipselect" line, just some "enable" line which valid data exists on high, falling edge and part low. Its trippy.
* only having 256 bytes of RAM is cramping my style: especially since I'm using 64 bytes to store the SID 'registers' so I can twiddle things without reading from the chip (since almost all registers are write-only) - yes, this does mean I'm actually using /global variables/ almost everywhere so I don't have to worry about a stack (and thus will have the compiler complain I'm out of memory, rather than the thing randomly wrapping and writing garbage where it shouldn't be.)

What I'll do differently when I route an actual board:

* I'll use shift-registers to talk to the LCD and SIDs. This means I don't have to sprinkle as many NOPs around as I'll be spending time latching in data to the shift registers. It does mean that the SID and LCD IO take 4 bits each: instead of the 8 + 8 + 5 bits they're taking now.
* More LEDs
* Probably implement a couple of analog sliders using the AVR ADC.
* Actually start writing some music with the thing.

I'll take some photos when I've built the keypad and LED daughterboard and have some software to show for it.


(Post a new comment)


[info]9_digital_lives
2006-01-03 09:47 am UTC (link)
GLOBAL VARIABLES!

I remember putting those everywhere when I first learned how to program... our teacher didn't know the difference, and never told us that local variables disappear outside scope / can share the same name as long as the scopes never overlap, so I thought it'd be easier to just declare them all in a module somewhere for easy access :(

Ah, those were the days...

(Reply to this)(Thread)


[info]erikarn
2006-01-03 10:14 am UTC (link)
Yeah, but I have 512 bytes of RAM in this. I can't use local variables: my stack is already being hurt by call depth.

(Reply to this)(Parent)


[info]klaxer
2006-04-29 09:58 pm UTC (link)
MIDI controlled?

(Reply to this)(Thread)


[info]erikarn
2006-04-30 01:18 am UTC (link)
Yup - http://www.creative.net.au/ has a link to the CVS repository with the (ugly) source. Its nowhere near synth-ready; it does speak MIDI and it does speak to the SID, but its not fully featured yet. As with normal adrian projects i just ran out of time..

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…