Wednesday, December 3, 2014
PicAXE AXE102 board full Schematic.
Early this year my son did a Systems project that required him to use a PicAXE circuit based on the AXE102 alarm board.
I was not able to find a full schematic so put the below diagram together. Hope it saves someone a few hours in the future.
( Oh, Careful if you do play with the school version of the AXE102 board. The chip may be a "08M-LE". Its a cut down version of the 08M with less ram and can only run one thread ).
While on the subject of PicAXE documentation. I am dissapointed that having pointed out to Picaxe.com that they have an error in their public facing AXE102 page in September that it is still incorrect.
Wednesday, November 19, 2014
Reverse Engineer HP 3550 LCD protocol
Well I hate to see things go to land fill so i pull usable bits from all sorts of electronic devices as well as dabble in a bit of scrap metal.
Anyway , i pulled a HP 3550 colour printer apart thinking it would contain yet another HD447800 text based LCD in it. Hmmm.. Na.. its a 28 pin graphic lcd ( GLCD) .
There are 3 LEDs and 7 push button switches. There is one chip, a BU6740AK . A web search shows no one has much if any data on it.
But there is a WordPress blogger called Kbiva that has done a few HP printer displays before that use this chip. Power , Ground, and 3 SPI pins sounds easy.. lets see what my new Bus Pirate tells me.
Hmm.. not much... I think i worked out what pins are what but the BP can only work up to about 1 meg. The 3550 LCD SPI looks to be faster than 1 meg. I was getting malformed SPI data.
So i ordered an 8 Chanel 24 meg Ebay Logic analyzer for under $10.
[ Insert a 10 day wait and stalking the mailbox HERE]
After 2 days of getting the new LA and playing with the Saleae software, i was ready to sus out what pins do what on the 3550 LCD.
I'll add the pinout here in a day ot two.
The SPI is running at just over 1 Mbps.
Below are the settings i found that worked for me. They are not the same as Kbiva used.
I did not get a screen shot of live data in the LA software but i'm sure you can search for examples if needed.
I captured several power up initializations as well as one with each of the buttons pushed down , and three that cover enough combinations of LEDs to know which is which.
I decided to export the LA data to CSV files that allows me to sort and colour the data to work out what bits do what. The below Dump1 may look messy, but it contains a lot of info...
The yellow bars across these extracts shown where i have cut out repetitive data.
I can see no LCD initialization section. For now i will assume there is a basic one to clear the screen and setup biases and basic register settings between the chip and the LCD.
0xA000 may be a reset out to the board.
0x0000 looks to be a clear buffer flush. Its used between raster , changing LEDs and sometimes before starting a new raster update of the LCD.
0x30xx (Green numbers) look to be LCD command selection.
0x70XX is outgoing data to the LCD or to an LCD command.
0x0800 looks to be a request for the controller status OR what switch has been released.
0x0900 looks to be a request for what switch has been pressed.
0x90X0 is used to turn on and off the LEDs.
A one off Initialization of sending 0xA000 and 0x0000 is then followed by a loop that waits until sending 0x0800 returns something other than 0x4001. ( Green block 0)
I think sending a 0x3004 , 0x7003 may be Clear Screen. (Violet block 1)
Next ( Blue block 2) looks to be setting the address to top left. The 0x70C0 is always the same but the 0x70XX after the 0x3004 increments from 0x00 through to 0x13 ( 20dec) as the columns are addressed.
The pixel data is fed in until the last lower right byte is sent ( Pink block 3)
Then starts a whole new screen update from top left again, but this time and then for all new screen updates we have the added config starting with 0x3002.
Each of the 0x70XX following a 0x30XX shown in the two Dumps here are the same in all my dumps with the exception of the data following the 0x3004 ( addressing) and 0x3007 ( i think is either here comes pixel data or Auto increment address with data).
Anyway , i pulled a HP 3550 colour printer apart thinking it would contain yet another HD447800 text based LCD in it. Hmmm.. Na.. its a 28 pin graphic lcd ( GLCD) .
But there is a WordPress blogger called Kbiva that has done a few HP printer displays before that use this chip. Power , Ground, and 3 SPI pins sounds easy.. lets see what my new Bus Pirate tells me.
Hmm.. not much... I think i worked out what pins are what but the BP can only work up to about 1 meg. The 3550 LCD SPI looks to be faster than 1 meg. I was getting malformed SPI data.
So i ordered an 8 Chanel 24 meg Ebay Logic analyzer for under $10.
[ Insert a 10 day wait and stalking the mailbox HERE]
After 2 days of getting the new LA and playing with the Saleae software, i was ready to sus out what pins do what on the 3550 LCD.
I'll add the pinout here in a day ot two.
The SPI is running at just over 1 Mbps.
Below are the settings i found that worked for me. They are not the same as Kbiva used.
I captured several power up initializations as well as one with each of the buttons pushed down , and three that cover enough combinations of LEDs to know which is which.
I decided to export the LA data to CSV files that allows me to sort and colour the data to work out what bits do what. The below Dump1 may look messy, but it contains a lot of info...
The yellow bars across these extracts shown where i have cut out repetitive data.
I can see no LCD initialization section. For now i will assume there is a basic one to clear the screen and setup biases and basic register settings between the chip and the LCD.
Dunp 1 - Init Codes |
0x0000 looks to be a clear buffer flush. Its used between raster , changing LEDs and sometimes before starting a new raster update of the LCD.
0x30xx (Green numbers) look to be LCD command selection.
0x70XX is outgoing data to the LCD or to an LCD command.
0x0800 looks to be a request for the controller status OR what switch has been released.
0x0900 looks to be a request for what switch has been pressed.
0x90X0 is used to turn on and off the LEDs.
A one off Initialization of sending 0xA000 and 0x0000 is then followed by a loop that waits until sending 0x0800 returns something other than 0x4001. ( Green block 0)
I think sending a 0x3004 , 0x7003 may be Clear Screen. (Violet block 1)
Next ( Blue block 2) looks to be setting the address to top left. The 0x70C0 is always the same but the 0x70XX after the 0x3004 increments from 0x00 through to 0x13 ( 20dec) as the columns are addressed.
The pixel data is fed in until the last lower right byte is sent ( Pink block 3)
Then starts a whole new screen update from top left again, but this time and then for all new screen updates we have the added config starting with 0x3002.
Each of the 0x70XX following a 0x30XX shown in the two Dumps here are the same in all my dumps with the exception of the data following the 0x3004 ( addressing) and 0x3007 ( i think is either here comes pixel data or Auto increment address with data).
I knew i was in the ball park when i spotted the binary in lines 1755 to 1760 in the above image.
A little ASCII art shows i have an Asterisk that matches the ones on the LCD at the time while the printer is initializing. Further trawling through the spread sheet found the memory test digits and "MB" characters that also told me i had the bits the correct way around.
The LCD turns out to be 32 x 160 pixels ( 32 rows of 20x8bits ).
With the way the data is sent from SPI to the LCD and the yet to be found initialisation settings, the byte pixel data is top left to bottom right.
Dump2 - LEDs and Switches |
Switches look to be read between screen updates or every 0.1 seconds.
LED updates or toggles are on 0.250 sec ticks.
Sw11= | 11101111 | OFF | 0x9000 | 00000000 | |
Sw12= | 11110111 | LED1 | 0x9010 | 00010000 | |
Sw13= | 11111011 | LED2 | 0x9020 | 00100000 | |
Sw14= | 11111101 | LED3 | 0x9040 | 01000000 | |
Sw15= | 11111110 | ||||
Sw16= | 01111111 | ||||
Sw17= | 10111111 |
I have not been able to find any GLCD controller chips with commands and registers with numbers like the ones in the right two digits of the 0x30XX and 0x70XX in the dumps.
I have enough to connect an Arduino up to replicate the above method of putting data on the LCD. I would like to find that the controller can also do character mode.
I connected the 8 channel LA to the 8 data pins on the LCD display its self. The data is exactly the same as the last byte of the data sent via the SPI bus. I sort of thought they may have been interpreted and sent to the LCD is a string of raw commands, but no.
The data to the LCD its self is clocked in 8 bits wide at about 30 uS
I hope someone can tell me what controller this display looks to be running.
Tuesday, October 14, 2014
Ebay Arduino Pro Mini boards that are not...
While purchasing the pressure sender in my last post i picked up two " Arduino Pro Mini compatible" boards for a few dollars each.
When they turned up i did the usual print out a copy of a schematic and pin out i found on line... Hmmm... the pin out of the programming header on the end of the board is NOT the same as the standard Arduino Pro Mini. Its more like that of the Mini. So be careful. they are swapped end for end.
OK , power it up.. Yes ! , the led blinks like a bootloader loaded Arduino should.. Buttt.. it was blinking at 4 times per second and not once a second! Someone got the fuses or timer pre-scaler wrong. Bugger.
( I have since found out that some people have been able to talk to the bootloader in this mode by changing the serial baud rate of the programmer.)
After a few hours i managed to get my SparkFun AVR Pocket Programmer to talk to the board using the below command lines.
avrdude -b 19200 -c usbtiny -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m
avrdude -b19200 -c usbtiny -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m
(ArduinoIDE 1.0.6 insists on trying to talk to the usbtiny via a com port when the new driver is pure usb. each time i want to use this programmer i have to edit the 'preferences.txt' file that in C:\Users\
( I like others can only upload by selecting 'Upload using programmer' from in the file TAB, the Upload button (>) generates an error at the end of the upload script.)
I connected the programmer to the Pro Mini with jumper leads and pushed out a new bootloader for a 5v, 16meg M328P. All was good again. One second duty cycle on the LED Blink.
Next was to talk to the board with a cheapy CP2102 USB-2-Serial(TTL) board. I did the usual reading up other peoples past experience and got it working by adding a 1 uF cap from the DTR pin on the USB-2-serial board to the reset line on the Ebay Pro Mini.
After a few days i wanted to clean up the 5 mini jumper wires that everyone uses nowadays and make a 5 to 5 or 6 to 6 plug set. While considering how to get the reset trace of the Pro Mini to one of the pins along the end of the board i noticed the end pin on the Pro Mini is labeled "DTR" and not RST. Tracing the board with a meter found a 0.1 uF cap already on the PCB connected to the reset pin of the CPU !!! I think there are a lot of people out there using old info and spending wasted time getting the auto reset working on the newer Pro Mini boards.
Yellow arrow is DTR pin from the CP2102 board extended out inline with the other pins.
The green arrow shows the "DTR" text that indicated the capacitor is already on the board.
The red circle is a reminder that my Pro Mini goes TX, RX, VCC, Gnd from this view.
So, i now have a 5 to 5 header cable that runs between the two tiny boards. The DTR auto reset asserted by the avrdude software and within Arduino IDE works every time now.
Arduino IDE settings when using the CP2102 board:
- Board= "Arduino Pro or Pro mini"
- Serial Port =" Com 11" ( your setting maybe different )
- Programmer= "AVRISP MKII"
Ebay MPXV7002 fault
Last week I purchased a MPXV7002DP air pressure sender from ebay for $14.
It did not work... It always showed 4.99 volts output and not ratio-metric centered at 2.5 volts. Someone has forgotten to ground pin 3 of the MPX.
Close inspection of the Ebay pictures of this and other sites shows a small plate through on the bottom of the PCB. The one i have does not even have a trace from pin 3.
The easy fix for my unit is to scrape a little paint from the ground plane next to pin 3 and bridge it with solder. Red arrow below.
It works perfectly now.
I have notified the seller. Lets see what they say.
It did not work... It always showed 4.99 volts output and not ratio-metric centered at 2.5 volts. Someone has forgotten to ground pin 3 of the MPX.
Close inspection of the Ebay pictures of this and other sites shows a small plate through on the bottom of the PCB. The one i have does not even have a trace from pin 3.
The above photo is of what i think are the newer boards that should have pin 3 grounded via the plate through seen in the yellow area.. |
Location of my solder bridge to ground. |
It works perfectly now.
I have notified the seller. Lets see what they say.
Welcome to my random ramblings and ideas blog.
I do some random things and find out stuff that others should find interesting.
Seeing that i go to the internet for help i think i should offer help that way as well.
There should be stuff in Electronics, camping, cooking, kids, cars..
Seeing that i go to the internet for help i think i should offer help that way as well.
There should be stuff in Electronics, camping, cooking, kids, cars..
Subscribe to:
Posts (Atom)