Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I don't know what to call it, but its like a data analyser.

Status
Not open for further replies.

NeX

Member
hello everyone,

bacially what i am trying to build, is a device that can read signals from a computer based thing and transmit it to my computer. at the moment there are three signals i want to read: clock, and two data transmit lines. i want to be able to read the state of both the data lines every time the clock is pulled high and pass that to the computer.

now i have found some things that will do it, called data analysers, but they are expensive and overkill for what i am doing.

i also found a guide on the internet of how to turn your parallel port into an analyser, but it is not fast enough. the clock speed of my signal is roughly 5 mhz, and the operating system on the computer wont allow so much processing time to be devoted to polling the parallel port, and either way i want to avoid using parallel and have some kind of USB thing.

i think this should be easy because there are so many things that do what i am trying to do, for example even a keyboard and mouse have a clock signal and transmit data, everything you plug into a computer is doing what i am trying to do, so there should be something that already does what i am after but i have no idea what you would call it.

so my first question is, does anyone know what this kind of thing is called, or if i can get a cheap, premade usb interface thing anywhere?

and if not, is there any other way i could be doing this? is it possible to interface maybe with serial or usb at a speed of 5mhz?

and finally, and probably more relivent to you guys is, is something like this possible to build by someone who is not the best with electronics and doesn't have access to surface mount PCB printers or any of that stuff?

thanks very much!
 
If I understand what you want correctly, I think you cuould use a PIC microcontroller with a CCP (Capture, Compare, PWM) module to capture your data. You could store it briefly (maybe 1 clock cycle) and then send it to a PC via USB or serial. Here is the data sheet for a very popular PIC, the 16F877A. The operation of teh CCP module is described in chapter 8. The PIC can operate up to 20 Mhz.
 
thanks very much for the reply. i will look at the data sheet in a sec, but you are saying that this will do the job of reading the two data channels on the clock pulse and store it and then send it on to the computer as a packet or something similar?

thing is, i need the data on the computer as fast as it is being transmitted, i can store it and have a delay, but the gap between each bit of data must be the same as the clock speed.

i was wondering if there is a way to just use a serial port or something with more recive lines, sync it with the clock that i am giving it and then just get it to read the recive lines on pulse or am i going to have to package the two transmit lines into one channel of data?
 
I'm not sure about your other questions but the 16F877A can capture serial data and send it to a PC. There are two CCP modules built into the 16F877A. You would use those in conjunction with Timer 1 which you'd have to synchronize with your external clock signal. I've never used the capture feature before but I believe that's what it does. Someone please correct me if I'm wrong. The handling of the data, formatting, and sending it to the PC would be done through a combination of user written software and existing built in hardware. Here are a few more referrences that will help you:

PICmicro MID-RANGE MCU FAMILY

Using the CCP Module(s)

Also, FYI there is a microcontroller forum here that this question might be more suitable for. Check it out:

Micro Controllers
 
You could also probably just use a Logic Analyzer, if you can find one that will record/save on computer. They are meant for digital communication only, and therefore are usually less expensive than a full blown analog data analyzer.
 
thanks guys,

i did a post in the micro controller section as well,

i am also looking up these PICs and the Logic Analyser,

thing is i am wondering if it is possible to do with out any hardware at all? is there a high speed port on the PC that i can check on every clock pulse and just read if the recive line is high or low?
 
You could possibly use a parallel port if the signals were of the same voltage levels and within the frequency range of the parallel port. You would also need a parallel port on the computer that you could bit twiddle. I've heard that USB to parallel adapters do not work for this.

I would look at a logic analyzer first though.
 
Last edited:
You could possibly use a parallel port if the signals were of the same voltage levels and within the frequency range of the parallel port. You would also need a parallel port on the computer that you could bit twiddle. I've heard that USB to parallel adapters do not work for this.

I would look at a logic analyzer first though.

yep, i have already tried the parallel port idea, my working voltages are a square wave of 0-5v so it was fine, but the computer just doesn't poll the parallel port fast enough to read the data, so i either need a buffer, or some port that i can poll faster...

and i just checked on ebay for logic analysers and they are still far to expensive for what i am trying to do, i need this as cheap as possible so i can reproduce the idea multiple times.

but its looking like a logic analyser is the only thing that will do it that is off the shelf. but there must be something existing and cheap that i can use. something like a usb harddrive should be fairly fast with a buffer, if i can send my signals in, instead of the harddrive and use it like that...
 
thing is i am wondering if it is possible to do with out any hardware at all? is there a high speed port on the PC that i can check on every clock pulse and just read if the recive line is high or low?

I don't know why this wouldn't be possible or even how it's much different in principle from some other common serial comummincation protocols. I once wrote a Perl script that commanded different circuits on and off through a parallel port but I've never done what you are asking about. Maybe you can find the answers you seek in a software forum.
 
I don't know why this wouldn't be possible or even how it's much different in principle from some other common serial comummincation protocols. I once wrote a Perl script that commanded different circuits on and off through a parallel port but I've never done what you are asking about. Maybe you can find the answers you seek in a software forum.

thanks for that. thats what i was thinking too, this is the problem i am having i know what i want to do, i just don't know where to start, if it is hardware or software etc.

i am going to google some signal programming stuff and see if that helps. problem is if i seach for using a computer to work out signals, then i get logic and data analysers, and if i seach for interfacing with serial etc i get stuff about how to package and unpackage data, which is not really what i want to do, i just want to monitor if a line is high or not, at a speed of about 5mhz
 
Thinking about it a little more, you could probably create a circuit that would buffer the incoming data and convert it to parallel. I'm not sure if de-multiplexing is the correct word to descibe it but that's what I'd call it. You could have 16 bit parallel data going into the parallel port so the PC would only have to scan it once every 5 Mhz/16. Not sure if that is still too fast or not and I'm sure there is something out there that exists to do this sort of thing short of spending several hundered buck on a logic analyzer.
 
Thinking about it a little more, you could probably create a circuit that would buffer the incoming data and convert it to parallel. I'm not sure if de-multiplexing is the correct word to descibe it but that's what I'd call it. You could have 16 bit parallel data going into the parallel port so the PC would only have to scan it once every 5 Mhz/16. Not sure if that is still too fast or not and I'm sure there is something out there that exists to do this sort of thing short of spending several hundered buck on a logic analyzer.

exactly, it seems simple enough, but i am not sure if i should be looking at software and finding a way to poll the parallel port faster, or hardware and some kind of buffer.

but because i am just monitoring the high or low state of two lines, it seems like overkill to be converting the data into a packet and passing it to the computer and have the computer unwrap it. the only way i can see that being more efficent is if each packet contains the data from maybe 50 cycles of the clock, but then again this is getting complicated, i need a computer outside the computer to sit there and monitor the data and store it and compress it and pass it to the computer.... if only they had thought of making parallel ports faster...
 
Would be helpful to know what is the transmitting device?

the data is comming from the LCD of a handheld. It has a black and white screen that has 4 bit graphics, when data 1 and 0 are low the pixel is clear, when data 1 and 0 are high the pixel is black, the inbetween are different shades of grey.

it has 5 lines that are useful, clock, data 1, data 0, horizontal sync, vertical sync. the data is only square wave of 0 or 5v+

i want to try and just get the pixels into the computer by reading the state of data 1 and 0 every time the clock is pulled high. and then sort the horizontal and vertical phasing later.
 
Do you have a datasheet for the display? Sounds like an SPI interface. If you don't have a datasheet or know the data format you're going to need some fancy gear to analyze the data.
 
Is there a driver IC in between the MCU of the handheld and the display? If so, can you read the part # off of it?
 
You could also probably just use a Logic Analyzer, if you can find one that will record/save on computer. They are meant for digital communication only, and therefore are usually less expensive than a full blown analog data analyzer.

Not sure where you got this idea. Logic analyzers are very powerful tools in debugging complex embedded designs. You can view entire address and data buses along with reads, writes and chip selects. And these units are hardly inexpensive. A good instrument is well over $10,000
 
Do you have a datasheet for the display? Sounds like an SPI interface. If you don't have a datasheet or know the data format you're going to need some fancy gear to analyze the data.

i don't have a data sheet for the display, but i already know that the data isn't in a format, its simply high or low impulses. the screen reads the state of data 1 and 0 every time the clock is pulled high, the state of data 1 or 0 can either be 0 or 5v+ nothing more complex than that,
 
Is there a driver IC in between the MCU of the handheld and the display? If so, can you read the part # off of it?

there is a very small 18 pin chip behind the LCD which is labled IR3E02, it seems to connect the horizontal and vertical connections together, so i assume that this is the driver for the LCD.

then there is a chip which is the graphics buffer, the video data leaves the CPU and goes into this chip then back to the CPU and out to the LCD, this chip is a LH5264 and seems to be a 64k ram chip.
 
but i already know that the data isn't in a format
No, it is in a format, you just don't know what it is. Without that info, your just milking a bull.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top