STM32 I2C EEPROM with HAL

#Talking to a I2C EEPROM using the STM32 HAL libraries This mostly a note to my future self. This code is based on the excellent answers provided at the ST forums, but combined here as a complete class. This was used to talk to a standard I2C EEPROM, 24LC256. The following header file definitions are required for the class : #define EEPROM_ADDRESS 0xA0 #define EEPROM_MAXPKT 32 //(page size) #define EEPROM_WRITE 10 //time to wait in ms #define EEPROM_TIMEOUT 5*EEPROM_WRITE //timeout while writing #define EEPROM_SECTIONSIZE 64 These setup the I2C address, the maximum page size of the EEPROM (32 used here for compadability)....

August 20, 2016 · 2 min · Ben V. Brown

Converting Reaver Pro to OpenWRT

Converting the Reaver Pro to run stock OpenWRT I bought one of the Reaver Pro units a fair while ago back when they were more useful.. Now that most routers have protection against the WPS exploit it has become mostly useless. However the unit itself is actually a really nice Alfa Networks HornetUB2 with upgraded Flash to 16MB and Ram to 64MB. Problem The U-Boot used on the router does not support the setenv command, and the unit comes with the memory boot location hard coded to 0x9f050000 which is NOT what all the documentation online appears to refer to....

July 27, 2016 · 12 min · Ben V. Brown

Project Zeta - RAM

Project Zero : The RAM In continuation of the development of Project Zeta, the small compact Z80 based microcomputer that I am slowly learning on, comes the next installment.. The RAM board! Now this is actually performing double duty as the ROM as well, as the inital plan is to program the RAM at boot with the program that the system is to be executed. Design The RAM board is designed to provide a nice simple breakout for two 32k SRAM IC’s onto the memory bus for the Z80, nothing fancy here, no bank switching or real logic....

July 15, 2016 · 4 min · Ben V. Brown

Project Zeta - MCU

Project Zero : The MCU (Programmer) To begin the design and creation of the project I worked on the base board of the design.. The Microcontroller, an Atmega 2560 was chosen to form the programmer and interface to the whole system primarily because of its large pin count and also I happened to have a few left over from a previous project. The Atmega is configured to run from its internal 8Mhz oscillator and to also output this out the CLKOUT pin so that later on this can be used to provide the system clock to the Z80, this is switched with a GPIO that can be used for single stepping support via a 74AC157 Logic gate....

July 12, 2016 · 3 min · Ben V. Brown

Enabling CAN1 on BeagleBone Green

Enabling CAN Bus on the Beaglebone Green by SeeedStudio Normally when I look to enable the CAN bus on the beaglebone black I have always followed the first guide I find online, however with the Beaglebone Green it comes with a newer debian image that does not support most of the documented methods of enabling CAN Bus (from around 2013). Modprobe We need to load the appropriate kernal drivers, this can be achieved by :...

July 11, 2016 · 5 min · Ben V. Brown

Tivaware on GCC (GNU)

Setting up Tivaware with GCC under CCS6 For a upcoming project I have designed in a TI TM4C123GH6PM, which is part of the Tiva lineup of ARM core processors. Naturally i would prefer to develop with the GCC compiler toolchain rather than the TI compiler, so this is a rough guide with notes for how i converted the given USB Device example code to use the GCC compiler instead. Compiler settings First, as normal, import the example project into CCS and build and test to ensure it works on the TI compiler first....

June 9, 2016 · 2 min · Ben V. Brown

Project Zeta

I have been following Veronica, a 6502 based computer being built by Quinn Dunki over at Blondihacks since the projects beginning in late 2011. Recently when sorting through my stock of collected parts I realized had almost all of the the required parts on hand. Whenever people talk about what they learned to program on it tends to come back to a few main chips, namely the 6502,z80 and the 6800....

May 8, 2016 · 2 min · Ben V. Brown

DELL Server Power Supply Repair

DELL Server Power Supply AA233300 repair These power supplies are available under a number of different model numbers / brands. However they are all really the same (only minor mechnical outside differences). This is great for us as it means that we can use them to repair other models if needed. The DS550-3 The DS550-3 is the actual manufacturers model number for this supply. It was manufactuered by Emerson, However it appears that the same supply is also manufactured by Artesyn Embedded Technologies....

April 30, 2016 · 2 min · Ben V. Brown

Rapid Floating Action Button in Android 2016

Getting the RFAB library to work in Android studio as of March 2016 Hi, this a quick update for any others like me who are trying to get this library up and running in Android Studio. Step 1 Open your build.gradle for your app (Not the project!). At the bottom of the file there should be the dependencies section, in this section insert the following entries: compile 'com.android.support:appcompat-v7:23.2.1' compile 'com....

March 29, 2016 · 2 min · Ben V. Brown

Tntroduction to NMEA2k

NMEA 2000 - Part 1 NMEA 2000 is the new standard that is being rolled out in boating (well has been for a while). This standard is notable as a replacement for NMEA 0183, as it resolves the issues 0183 faced. NMEA 2K is based on the CAN BUS communications platform, this is an awesome as it resolves the main issue of connecting multiple devices on a single bus. Also included in the specifications for the NMEA 2K standard is two styles of wiring (Mid and micro size) with matching connectors....

March 20, 2016 · 2 min · Ben V. Brown