Getting data to LCD

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Getting data to LCD

Post by birdtrick » Mon Jan 23, 2017 11:09 am

I have an existing PCB and I am trying to "tap into" some of the data being sent out of the microcontroller from a specific pin (OSC2/CLKO/RA6). Really my primary question is, do I need to have access to the code on the microcontroller in order to interpret the data coming from this pin? I want to display two parameters within this data, rpm and temperature, on a LCD display. But if it requires "knowing" the code on the PIC, then I won't bother pursuing. If it is possible to do, then I am trying to learn the easiest way to do it.

I hope this question makes sense. I am obviously new to PIC stuff..

Thanks,

Troy

User avatar
phalanx
Non-SFE Guru
Posts: 1948
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Getting data to LCD

Post by phalanx » Mon Jan 23, 2017 3:37 pm

If you know the format of the data being transmitted from the PIC, it's not difficult to tap into it and use another microcontroller to process it in a different manner. If you don't know the format of the data, it's still possible but requires a lot more work in reverse engineering the protocol. Do you have more information for us on the parts you are trying to tap into?

-Bill

birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Re: Getting data to LCD

Post by birdtrick » Mon Jan 23, 2017 3:43 pm

Thanks Bill. It's a PIC18F2520, pin 7.

User avatar
phalanx
Non-SFE Guru
Posts: 1948
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Getting data to LCD

Post by phalanx » Mon Jan 23, 2017 8:34 pm

That's a start, but I'm looking for a bit more. What is the board? Is it custom or an off the shelf solution? Besides the PIC, what is the signal you are trying to read connected to? Is there any documentation on the data being transferred from the pin in question. Do you have access to source code? How do you know the data you need is available from the RA6 pin?

Any details that can help us figure out what's going on will get you a better answer.

-Bill

birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Re: Getting data to LCD

Post by birdtrick » Mon Jan 23, 2017 9:45 pm

Bill, I really appreciate your willingness to help somebody a bit clueless like myself..

I have attached a diagram that will hopefully paint a better picture of what's going on. This is a custom board that controls the speed of a motor based on different parameters coming into the board from sensors. Currently a LCD is connected to the pin I have indicated in the diagram. There is a bunch of data coming up on the LCD and I would like to reduce this data down to simply rpm and temperature.

The current LCD allows for settings that can be changed in the microcontroller. But pin 7 is "one-way out", so this data is being sent into the PIC through another pin (just my assumption). I suppose this is where the "branch off" lines between the LCD pin and pin 7 come into play. I have indicated in the diagram what the components are that connect to this line.

Thanks again,

Troy
Attachments
Diagram.jpg

User avatar
phalanx
Non-SFE Guru
Posts: 1948
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Getting data to LCD

Post by phalanx » Tue Jan 24, 2017 7:15 am

Hi Troy,

Is there a datasheet, full schematic, or source code available for the motor controller board?

What you are describing to me sounds like there is a menu system on the display and the data you want to intercept isn't necessarily displayed all the time. If that's the case, it would be unreliable to try and intercept it there (it would need to be a static display). From what you're describing, it sounds more and more like it would be much better to modify the firmware of the board to get the results you want.

-Bill

birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Re: Getting data to LCD

Post by birdtrick » Tue Jan 24, 2017 9:13 am

When the board is powered up, the first items displayed on the LCD include the rpm and temperature. They stay there unless an input is made on the LCD to switch screens.

Unfortunately I don't have any sort of datasheet or other resources available.

User avatar
phalanx
Non-SFE Guru
Posts: 1948
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Getting data to LCD

Post by phalanx » Tue Jan 24, 2017 3:32 pm

Without additional information, we are rapidly leaving the realm of easy solutions.

Do you have any info on the LCD and the protocol it uses to communicate?

How did you come across this board with no available information?

-Bill

birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Re: Getting data to LCD

Post by birdtrick » Tue Jan 24, 2017 6:36 pm

I do know that the LCD interface is using a PIC32MX170F256D. Maybe that helps?

Sorry it's such limited information. It's a project torn from a part manufactured who knows where.

User avatar
phalanx
Non-SFE Guru
Posts: 1948
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Getting data to LCD

Post by phalanx » Wed Jan 25, 2017 3:08 pm

Unfortunately it doesn't because the PIC on the LCD can be programmed to do just about anything you want. What you need to understand is the format of the data being transferred between the motor controller board and the LCD. If you knew this, we can tap into and monitor the data from your own microcontroller and have it display whatever values you want.

Without details on the boards you have, you are pretty much SOL unless you have access to an engineer friend who could start reverse engineering the parts.

-Bill

n1ist
Support Volunteer
Posts: 990
Joined: Wed Mar 22, 2006 11:02 am

Re: Getting data to LCD

Post by n1ist » Wed Jan 25, 2017 7:27 pm

Where did you get that PCB layout that you posted the picture from? If you can post a schematic, there may be more clues there.

I'd start by connecting that pin to a scope to look at the signal. If you are lucky, you can figure out the format. Then connect it to a logic analyzer and try to figure out patterns - what does it look like when the rpm stays constant but the temperature change? As long as it isn't encrypted (and most likely it isn't), you should be able to figure it out.

birdtrick
Posts: 8
Joined: Mon Jan 23, 2017 10:50 am

Re: Getting data to LCD

Post by birdtrick » Thu Jan 26, 2017 11:26 am

I am going to see if I can get more of the layout diagram. I will also do the other things you recommended and see what I find. I'm completely new to scopes and logic analyzers but willing to learn! Sounds like fun.

Thanks again Bill.

Post Reply