Pins ATmega328P in comparison to Arduboy?

#1

Hey! I did download the datasheets but had a hope you guys had a cheat sheet. I’m looking at porting a bunch of sketches like abSynth-FM and they all address pins that are differently addressed on midiboy. Trial and errror, will get me there, but… hope, hope. I did get a simplified version of abSynth doing FM (I’m supposed to be working on midi stuff :slight_smile: but it’s a hack :slight_smile:

some addresses/constants like:

OCR4A = ((uint16_t)(0x8000 ^ dac_l) >> 8);
or
cbi(TCCR2B, CS43); // CS00 from the handbook

fail. Did I just not read the specs carefully enough (sigh).

0 Likes

#2

Check the datasheets of ATmega32U4 (the one Arduboy uses) and ATmega328P (Midiboy’s chip), the latter has less timers, so you’ll have to reimplement the code that accesses the timers directly using the timers available. Also see the Midiboy’s schematic for reference.

Here’s an example of how I ported the ArduboyTones library: https://github.com/BlokasLabs/ArduboyTones/commit/ab847411def818f25b51fea7c7c87674e0ddc7f7

0 Likes

#3

Ah! Of course the tones library port helps a bunch :slight_smile: Thanks!

0 Likes