New Projects

It’s been a little while.  A lack of time and interesting projects combined to keep me from posting.  I bought a 3D printer some time ago but that’s mainly been a story about an EE learning how to use 3D modeling software.  I’ve become pretty proficient with it though and may try to include it in some future designs/projects.  

I came across the PSoC family of microcontorollers a few years ago as well and they’ve subsequently become my favorite thing in the world.  I’ve used them extensively in my professional and personal projects, nothing I’ve ever really been able to post about but I’ve got a few active projects that I should be able to share in the near future.  

Student Unmanned Aerial Systems

I was hoping that going back to school would free up some time to continue working on projects and add to the site, however that has not been the case. Things have gotten actually gotten more hectic. I’ve got my normal school workload with senior design thrown on top. Speaking of which, my senior design project is creating an entry to AUVSI’s Student Unmanned Ariel Systems competition (SUAS). I am a part of the communications team which is working to create multiple communication channels between the base station and aircraft so that it is capable of flying autonomously and reporting back image data. The details of this project will be updated on a sub-domain linked below.

Drexel SUAS Blog

Since I haven’t had time to fully invest into new projects I’m going to start posting some details about a previous project of mine; a Gameboy emulator. This is an software emulator of the Gameboy system written in java for the android platform. This was the precursor to the FPGA NES that I hope to start working on again sometime soon. For now though, the Gameboy emulator (which I’m tentatively calling GameDroid) is in a fairly stable, fully working state. It has been able to play most games I’ve thrown at it with full controls, save functionality, and sound. There are some performance and timing issues that need to be fixed and I’m intending to rewrite most of the engine to work those out.

SD Progress

I’ve found it difficult to find a 100% complete picture of the SD Card SPI protocool.  However, this is what I’ve pieced together and has managed to allow me to communicate with a Sandisk card I had sitting around.  Overall progress has been slow as I’ve been occupied with other important things.  I have however managed to squash the bug that turned my data line into an oscillator and have successfully read the contents of the OCR register.  So, although it’s been slow there has been progress and I expect to be able to pick up the pace again now that things have settled and I’m transitioning back into school.

SD Command Packet

Continue reading “SD Progress”

SPI and SD Cards

Over the past week I’ve been working on communicating with an SD Card using my custom SPI Controller. I’ve uncovered some bugs in the controller and begun having some success in communicating with the SD Card. A combination of unique SD Card behavior and a clock phasing bug meant I spent far too long debugging an unresponsive SD Card in the beginning stages of experimentation. Unlike a lot of the signal captures I’ve found online the SD Card I’m working with does not drive the DAT0 line high until it receives a valid CMD0 packet. My protocol analyzer was indicating that the packet I was sending out was a valid CMD0 yet nothing I did received any response from the SD Card. After lengthy debugging I looked closer at the serial data bus and found that my clock phasing was actually inverted. With the clock phasing fixed the SD Card now Drives high and responds with the expected idle response (0x01).

Aside from the bug fixes I’ve added the ability to trigger a single byte transfer from the SPI controller.  This makes it much easier to prepare a data byte and send it out by removing the necessity to determine when the controller is going to poll the input bus.  It’s still a bit cumbersome as I was unable to get my intended design to synthesize.  I haven’t yet gotten a complete grasp on the details of the VHDL to hardware process which leads to some hiccups, but the code I have now is enough to establish communication. My current work is on another bug which is likely in the SPI Controller portion of my circuit. After receiving a card ready response (0x00) the MISO line turns into a 12kHz clock and the SD card loses synchronization.