STM32 ADC with DMA

Most of my current projects are using the very, very nice stm32f103 series of chips, as these provide excellent performance per dollar cost. The embedded DMA in these chips is a massive help in getting a project up and running without any struggle for cpu power. I find the DMA documentation to be lacking at best with getting this system up and running using the new HAL drivers from STM. While this is actually quite an easy system to get up and running, I could not find any nice notes on how the system should be setup and things to be aware of. ...

November 2, 2016 · 5 min · Ben V. Brown

TS100 Soldering Iron

TS100 The ts100 is a portable DC powered soldering iron released by minidso. The unit offers between 25-70W of output power at the tip depending on the input voltage, and has removable tips (Not compatible with other irons as far as I know). Sadly the unit is crippled with their system for changing settings, while the unit supports nice options such as a customizable cutoff voltage; wake on motion, and automatic sleep times. They decided to make these options only available to be changed using the USB connection to the computer. ...

October 1, 2016 · 3 min · Ben V. Brown

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). along with the timeouts. Section size is used internally similar to a ‘bucket’ that each object stored, is stored in. ...

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. We utilize two logic gates (7432 OR gates) to decode the output gating and the write enable on the two chips. Along with an inverter on the A16 line of a single transistor. ...

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. Almost all of the connections on the Atmega are used for the CPU bus and associated lines, this ties up 34 pins of GPIO on the Atmega. The Address bus and data bus are arranged such that they fall neatly on the ports of the atmega so that we can directly write bytes to the ports directly without any bit fiddling. ...

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. Right click on the project and goto project settings Click on the General tab, and make sure that your chosen device is chosen. Change the Compiler version to the newest GNU compiler Click OK, and CCS will prompt you to create a new Debug__GNU configuration automatically, choose OK to continue. Now open the projects properties again and move to the (Build->GNU Compiler->Runtime) The defaults are all correct here except for the floating point version used, where the default libraries were compiled for soft floating point. Thus you need to change the floating point option (-mfloat-abi) to softfp Next move down to the settings, setting these as shown (All of these settings can also be copied from the TI compiler settings by changing the configuration option at the top and just going back and forth) GNU Compiler ...

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. The z80 took my interest, partly because I liked the challenge of having less information and compilers to rely on, partly because I liked the IO input/output system it used but mostly purely because I had one that I believed worked. ...

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