Category Archives: Uncategorized

Samsung HT-X200 Teardown – LED display control

Published by:

In the recent YouTube video I uploaded I went into detail to show how to write to the display, which has 3 PT6961 IC’s, from an Arduino

Below is the chart that I put together to map the physical locations to the logical locations.

note: the data bytes are actually used in reverse order on the IC’s so they will need to be flipped when copying data from the buffer to the actual display.

The code is as follows:

/*
 LED Display test
 By Peter Murray
 Writes to PT6961 IC's
*/

#define CMD1 0b00000011 // Display mode setting command
#define CMD2 0b01000000 // Data setting command
#define CMD3 0b11000000 // Address setting command
#define CMD4 0b10001111 // Display control command
#define CLK 2
#define DAT 3
#define S1 6
#define S2 5
#define S3 4

unsigned long dBuffer[7]; // Display buffer - last 3 bits are ignored.

void writeByte(byte toWrite)
{
 int x;
 for (x=0;x<8;x++)
 {
 digitalWrite(CLK,LOW);
 if (bitRead(toWrite,x))
 {
 digitalWrite(DAT,HIGH);
 }
 else
 {
 digitalWrite(DAT,LOW);
 }
 digitalWrite(CLK,HIGH);
 }
}

void writeByteReverse(byte toWrite)
{
 int x;
 for (x=0;x<8;x++)
 {
 digitalWrite(CLK,LOW);
 if (bitRead(toWrite,7-x))
 {
 digitalWrite(DAT,HIGH);
 }
 else
 {
 digitalWrite(DAT,LOW);
 }
 digitalWrite(CLK,HIGH);
 }
}

void displayBuffer()
{
 int x;
 digitalWrite(S1,LOW); digitalWrite(S2,LOW); digitalWrite(S3,LOW);
 writeByte(CMD2);
 digitalWrite(S1,HIGH); digitalWrite(S2,HIGH); digitalWrite(S3,HIGH);

 digitalWrite(S1,LOW);
 writeByte(CMD3);
 for (x=0;x<7;x++)
 {
 writeByteReverse(dBuffer[x]>>24);
 writeByteReverse(dBuffer[x]>>16);
 }
 digitalWrite(S1,HIGH);

 digitalWrite(S2,LOW);
 writeByte(CMD3);
 for (x=0;x<7;x++)
 {
 writeByteReverse(dBuffer[x]>>13);
 writeByteReverse(dBuffer[x]>>5);
 }
 digitalWrite(S2,HIGH);

 digitalWrite(S3,LOW);
 writeByte(CMD3);
 for (x=0;x<7;x++)
 {
 writeByteReverse(dBuffer[x]>>2);
 writeByte(0x00);
 }
 digitalWrite(S3,HIGH);
}

void setup()
{
 pinMode(CLK, OUTPUT);
 pinMode(DAT, OUTPUT);
 pinMode(S1, OUTPUT);
 pinMode(S2, OUTPUT);
 pinMode(S3, OUTPUT);
 digitalWrite(S1,HIGH);
 digitalWrite(S2,HIGH);
 digitalWrite(S3,HIGH);
 dBuffer[0] = 0b10000000000010000000000010000000;
 dBuffer[1] = 0b01000000000101000000000101000000;
 dBuffer[2] = 0b00100000001000100000001000100000;
 dBuffer[3] = 0b00010000010000010000010000010000;
 dBuffer[4] = 0b00001000100000001000100000001000;
 dBuffer[5] = 0b00000101000000000101000000000100;
 dBuffer[6] = 0b00000010000000000010000000000010;
}

void scrollScreen()
{
 bool y;
 int x;

 for (x=0;x<7;x++)
 {
 y = bitRead(dBuffer[x],31);
 dBuffer[x]<<=1;
 if (y)
 {
 dBuffer[x]+=1;
 }
 }
}

void loop()
{
 // put your main code here, to run repeatedly:
 displayBuffer();
 delay(100);
 scrollScreen();
}

Some changes to my YouTube Channel

Published by:

Time has come to spruce up my YouTube channel and start putting more content out with a bit more substance.

I’ve been busy with getting settled into university and now feel I have time to put more effort into my channel.

Sundays I will be releasing new teardown videos, these may be single part teardowns or multi-part, depending on how complex and how long it runs.

Fridays will be my cool down days from university so I will be recording some gaming videos (possibly live stream, not sure yet) and I will have it edited and released the following Friday.

Another change I have made is that I have now signed up with Patreon, I’m still learning how to set this up so my page on there needs a bit of work. My intention is to have it in place if people are interesting in supporting my work.

Benefits of being a Patreon will be as follows:

  • Early access to my videos
  • Credits on Patreon supported videos
  • Patreon only content when it is available
  • More benefits to be established as time goes on…

If you are interested in supporting my channel, please go to my Patreon page.

Using ROM’s as combinational logic (Updated)

Published by:

Someone commented on my youtube video about the EPROM as combinational logic stating that the video was too quiet. Unfortunately my original footage is no longer available to re-upload so I decided to redo it. This time I decided to expand upon the concept by including other ROM types than just the EPROM since the concept does apply to all parallel ROM’s.

The software I designed should work the same for different types of ROM’s since they follow the same concept.

A new page has been created with the document on it here: http://39k.ca/using-roms-as-combinational-logic/

The new video can be found here: https://www.youtube.com/watch?v=t6alYGpdrqU

 

Using EPROMs and simple combinational logic

Published by:

This post has been replaced by a newer version:

Using ROM’s as combinational logic (Updated)


A few years back I came across something in an old Z80 book that mentioned that EPROMs can be used a crude logic devices, though only supporting combinational logic, you could craft the data to mimic logic. Recently I tried it out and found it to work really well.

I recently uploaded a YouTube video showing my experiment.

In the video I hand-crafted the code to go into the EPROM, this took a while just to act as 2 logic gates, so I decided to have a go at writing a bit of software to do it for me.

Boolean to ROM conversion software

boolean2rom

I wrote this in Delphi and you can put up to 8 boolean algebraic expressions into the boxes, one for each data line output. You select how many address lines you are using (you can put only the number your actually using and ground the rest in hardware) Then you hit the “Parse” button and it will go through each address combination using the boolean expression to create the required data for each location.

This is only a first version so may have some kinks that need to be ironed out. The handling of parenthesis is very crude and does not take them into consideration with order of operation. it does somewhat process the order as ~(NOT), * (AND), +(OR), ^(XOR).

Valid inputs are A-P (not case sensitive), these are representative of A0-A15 inputs. Unused Data lines can be unchecked to not have them used

Once you have parsed what you need, you can view the data to the right on the table. Note: These numbers are all in Decimal!

You can then hit the “Save…” button and select where you want to save the binary file. Note: you need to add you own .bin extension, I’ve not added it yet.

 

Hopefully this will be of some use to people, it’s certainly an interesting concept.

 

Dave Jones from the EEVBlog used a similar method to make a finite state machine PLC back in 2000 : http://alternatezone.com/electronics/plc.htm

 

bye for now, if you have any questions, suggestions, etc.. please contact me:  peter AT 39k.ca

Welcome to 39K

Published by:

Welcome to 39K, here you will find many things related to electronics, as well as some other things that are not.

On this site I will be hosting the pages for the power supply project that I am currently showing on my YouTube channel.

This site is currently being built up so more will be following shortly, thanks for stopping by.