![]() ![]() The screen also prints from right to left, which means that everything has to be entered in the reverse order to display correctly. In each byte, a 1 means the LED is off, and a 0 means an LED is on. The 8 th bit is unused, so I set it to 1 in all of my codes. In each byte, the LSB is the bottom of the screen, and the MSB is the top. Each byte of the 5 character bytes represents a single column. What I found was that each character is 5 LEDs wide and 7 LEDs tall. After 2 or 3 tests I figured out what was going on. My basic process was to write all 1's or 0's to different rows/columns, record what happened, and then write new values. I changed the second byte of the fan to 1 so that the first screen only displayed a single character, and then experimented with different values until I figured out how they mapped to the LEDs. Rather than try to pull the alphabet out of all the character codes on the fan (which would have yeilded an incomplete set anyways), I decided to just figure out how the characters are stored and then create my own set. The first thing I did was change the first byte of memory to 1 instead of 6, which caused the fan to only display the first screen. Once I had read and stored all the data (so I could presumably restore it if I totally messed up the fan), I started experimenting with writing data to the fan. Below you can see the beginning of the data dump. ![]() The very next byte contained the length of the second screen, and that pattern continued to the end. The second byte of memory contained the number 16 (0x10), and the following 5x16=80 bytes contained the character codes to display. So, the first screen initially read “Thx 4 being safe”, which contains 16 characters. From another post about a similar fan I'd seen that the data was probably stored with 5 bytes per character, and I confirmed that this was the case. The very first byte of memory contained the number of screens, and the second byte contained the number of characters in that screen. I wrote out each of the messages displayed on the screen and counted their characters. I converted the values to decimal numbers so I could make more sense of them and then tried to figure out the data format. #Usb led fan editor mac serialI wrote a short sketch that read out each page of memory and sent it over the serial port to my PC, and then copied all of the data to Excel as a single column. After wasting a couple hours on that dead end, I pulled out my Arduino and was immediately able to read the EEPROM. ![]() I have used the Bus Pirate from Dangerous Prototypes in the past for initial I2C prototyping with new chips, but I didn't have any luck with this one.I may have done something bad to my Bus Pirate. The first thing I tried to do was read the data stored on the EEPROM. For the CAT24C04, the a8 bit is 0 for bytes 0-255 of the EEPROM, and 1 for bytes 256-511. Those pins were connected to ground, so both values were zero. The first 4 bits are fixed, and then A2 and A1 are determined by the state of the corresponding pins. #Usb led fan editor mac how toThe table below (from the EEPROM datasheet) shows how to figure out the I2C slave address. The smaller EEPROMs can address their entire memory in a single byte, but the 4kbit (and larger) versions require part of the device address for the higher values. The 512 byte version leaves the A0 pin unconnected and that bit in the EEPROM slave address is reserved for the high bit of the memory address. I'm assuming they use the same fan PCB with the smaller EEPROMs and use the other address bit for some reason. The PA0 pin threw me for a little bit, but it is connected to what would be the A0 address pin on the EEPROM for smaller chips in the same line. On the back side of the PCB, the 5 pin port was labeled:, and I confirmed that these pins were connected to the I2C SDA and SCL pins on the EEPROM. Whatever microcontroller is being used is under a black blob, but the SOIC-8 IC with a marking on it was a CAT24C04, which is a 4kbit (512 byte) I2C EEPROM. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |