Recent Posts

When playing with the raspberry Pi I noticed a couple of oddities. If I have a mouse and keyboard plugged into a usb hub the ethernet goes very slowly and as soon as X is run pretty much becomes unusable, filling the kernel messages with:

This can can also be noted in the ping times to the local router, which are of the order of 0.9ms normally and 500-2500ms when a mouse and keyboard are plugged into the hub.

This seems to have been attributed to noise from somewhere, either from the hub or from using the HDMI (As the errors only appear to happen when X is running).
This has been discussed at https://github.com/raspberrypi/linux/issues/60

Temporarily worked around this issue by plugging both mouse and keyboard into the PI itself, although long term this is less than ideal.

After much stumbling around and trial and error I managed to get it to light each segment. The notable points(errors) were:

I2C is an open collector bus, meaning each device only pulls the data lines low. This meant that I had to turn on the Bus pirates on board pull up resistors, as for some reason the ones I thought were doing it on the board weren't.

When using the bus pirates pullup resistors, the Vpu(V pull up) lead should be connected to +5V.

The board requires a large voltage inorder to get the Led's to light, my initial attempts used the bus pirate to power it, but this was both too low current 125mA and too low in voltage for anything to light. I then connected it to an external power supply and found it lights best at about 12V although the chip does get a little warm :S (The data sheet claims it's good till 18V)

The digits are counted from the right hand side(with the chip and sockets at the bottom).

The Digits are are as follows:

0 - 0xfd

1 - 0x0c

2 - 0xda

3 - 0x9e

4 - 0x2e

5 - 0xb6

6 - 0xf6

7 - 0x22

8 - 0xff

9 - 0xfd

Bus pirate:

I once it's connected the bus pirate need to be set to I2c mode i found the default 5khz speed worked fine for me. The pullups and on board power supplies are turned on by sending 'Pn' and 'Wn' respectively. Then to write to all the digits at once I used the following command:

[ 0x76 0x00 0xf2 d1 d2 d3 d4 ]

Where 0x76 is the device address (determined by a potential divider connected to pin 1 of the chip). 0x00 Tells it i want to start writing at the control register. 0xf2 Tells it to refresh all digits and I want them at maximum brightness. then d1,d2,d3,d4 represent the digits in hex.

If you want to play audio from mplayer, it's broken. Well very buggy there's currently an open issue https://github.com/raspberrypi/firmware/issues/2 addressing it in which anumber of things are suggested. Although it can be bodged round using "mplayer -ao sdl" to play viasdl which some reason gets round (from my understanding) the buffer underrun in the alsa module. - This was fixed! 😛

LAMMPS (http://lammps.sandia.gov/) can be run on the PI, it is however very slow. Using stock debian-arm and lammps built with gcc -mfloat-abi=softfp. I managed to achieve 100ps NPT in 89 hours for alanine with 1728TIP3P water molecules. This could be improved if I moved to Raspbian (http://www.raspbian.org/) which is built to use the hardware floating point unit.