Datasheet
8 | Page
To program the 48 using a JTAG-ICE you need to use the "squid" cable and make the following
connections:
At the left there are the GND (white) and 5V (Purple) connections.
At the bottom row right are the Reset (green), Mosi (Red), Clk (Black) and Miso (Grey).
3
The equivalent JTAG names for these are: nSRST, TDI, TCK, TDO
4.3 Using/running the Atmega-48
What was written about the 328 also is valid for the 48: when the device has been programmed
it will run that program independent of the Raspberry-Pi. In fact you can remove the board from
the Raspberry-Pi and use it standalone.
When developing programs you may leave the jumpers in place as the programme will tri-state
its pins and set the reset pin high when it has finished. This is NOT the case if the PI is reset or
not powered. Especially the reset-jumper needs to be removed otherwise the Raspberry-Pi GPIO
pin 8 (which is default low) will the keep the 48 device in reset or you can run the reset_off
script.
You should also remove the jumpers if you want to use any of the following pins: B3,B4,B5,C6.
4.4 Real Time Clock
The Atmege-48 device has a 32768Hz crystal connected to operate as a Real-Time-Clock (RTC).
Example code for this can be found under section 8.2 Atmega-48. The Crystal is a high quality
type and under normal conditions a deviation is less than 1 sec/3 days.
The other part of the RTC is that the Atmega-48 has a 3V battery. It will switch to that battery
when the 5V power is removed. As the Atmega-48 is a fully programmed microcontroller it can
be set-up to perform other operations or hold other data when the main power of the BCM2835
is removed.
If you have programmed the Atmege-48 correctly it uses ~1µA when powered down.
4.5 Infra-red receiver/remote control receiver
The BCM2835 does not have a native IRDA interface. The protocol can be implemented using a
standard GPIO pin but that puts a very heavy burden on the CPU. To support IRDA the Atmega-
48 has a TSSOP4038 IRD device connected to pin D3. This device supports the most common
IRDA protocol: 38KHz IR signal.
Unfortunately we could not run the IRDA interface from the battery as it uses too much current
(~450 µA). Thus you need the 5V present for it to operate.
3
The colours used here are the same as on MY squid cable but I can't guarantee all squid cables are the same.