Go Down

Topic: Stealing data sent to an LCD (Read 9127 times) previous topic - next topic

Graynomad

oops, change the count definition to

volatile int count = 0;
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

Ok, now we are getting somewhere.... output is exactly as shown below.

...Oÿîîîîîîînÿnsnsnsnsnsnsnsnsnsnÿîîîîîîîîîînÿnsnsnsnsnsnsnsnsnsnÿîîîîîîîîîînÿnsnsnsns

bobhaha

#32
Oct 20, 2011, 05:47 pm Last Edit: Oct 20, 2011, 05:50 pm by bobhaha Reason: 1
Ok... changed the count definition....

Here is the output...

Code: [Select]
...3F
3F
3F
3F
3F
3F
3F
3F
3F
0
0
30
0
20
0
20
10
30
0
0
0
0
0
0
0
10
20
0
0
0
20
0
10
0
0
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
0
0
30
0
20
0
20
10
30
0
0
0
0
0
0
0
10
20
0
0
0
20
0
10
0
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
0
0
30
0
20
0
20
10
30
0
0
0
0
0
0
0
10
20
0
0


EDIT: there is 103 periods (.) before the output... but the forum cuts it out.

Graynomad

Take out the print from the ISR.
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

Code: [Select]
3F20
0
20
0
20
0
0
0
0
10
0
20
20
0
0
0
0
20
20
0
10
10
10
0
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
0
0
30
0
0
0
20
10
10
30
20
0
20
0
20
0
20
0
0
0
0
10
0
20
20
0
0
0
0
20
20
0
10
10
10
0
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
0
0
30
0
20
0
20
10
10
30
20
0
20
0
20
0
20
0
0
0

Graynomad

We we're getting something but it doesn't look very promising.

WHat is being displayed on the LCD

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

It should be this....

0mW
EN DN UP

Graynomad

Most of those displays have a minimum E pulse width of 250-300nS I think. If yours is using such short pulses the code will not be quick enough.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

I'm pretty sure it works off 4800 baud rate.

Would a shift register work at all.... or is the interface speed between the arduino and shift register still too fast?

Graynomad

Quote
I'm pretty sure it works off 4800 baud rate.

I thought we determined this was NOT a serial LCD.

If you're using E and the data pins that it can't be, in which case 4800 baud doesn't mean anything.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

Oh my bad... Sorry, its obviously not a serial LCD. The only speed that the manufacturer supplies is 4800 baud for the main processor which by the way is a PIC14F628-26/P

Graynomad

Try this code
Code: [Select]
#define BUF_SIZE 100  // change this to a larger number when/if it works
byte buffer[BUF_SIZE];
byte * ptr = buffer;

void setup () {
   Serial.begin (115200);

   for (int i = 0; i < BUF_SIZE; i++) {
      while ((PIND & 4) == 0) ;  // wait for E = LOW
      *ptr = PINC;
       ptr++;
      while ((PIND & 4) != 0) ;  // wait for E = HIGH
    }

   for (int i = 0; i < BUF_SIZE; i++) {
      Serial.println (buffer[i], HEX);
   }
}

void loop () {};


Then I have to hit the sack.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

#42
Oct 20, 2011, 06:37 pm Last Edit: Oct 20, 2011, 06:43 pm by bobhaha Reason: 1
Code: [Select]
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10


EDIT: I'm also getting outputs like this....

Code: [Select]
0
0
0
0
0
0
0
10
10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Graynomad

Hmm, different but no better.

There's either a bug in my code or the pulse is too short to be reliably trapped by the code.

You said
Quote
It should be this....

0mW
EN DN UP


What we are doing should not affect anything so the display should be working as per normal. Is it?

You may need an octal latch to catch the data, same as you were doing with the shift reg but use a latch instead and feed the latch outputs into A0-5 and revert to my first piece of code that used the interrupts.

Anyway it's too late here to think clearly about it.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bobhaha

Well I need to take the LCD screen out of the socket to gain access to the data. But it should look like that yes.

I noticed when I put it on bread board and tried your code out the screen would fill with pixels in a loading kind of sequence. I thought that would have to do with floating pins so I removed the LCD. Right now the arduino is in a breadboard and the pins are directly connected to the socket, no LCD in between to skew results.

I'm from Sydney by the way.

Time for me to start my assignment... have a think about it and I will too... and if you can think of anything... just let me know.

You've been a great help so far!

Thanks!!!

Go Up