Pages: 1 2 [3] 4   Go Down
Author Topic: Stealing data sent to an LCD  (Read 8498 times)
0 Members and 1 Guest are viewing this topic.
nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oops, change the count definition to

volatile int count = 0;
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok... changed the count definition....

Here is the output...

Code:
...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.
« Last Edit: October 20, 2011, 10:50:07 am by bobhaha » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Take out the print from the ISR.
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

WHat is being displayed on the LCD

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It should be this....

0mW
EN DN UP
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this code
Code:
#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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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:
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
« Last Edit: October 20, 2011, 11:43:51 am by bobhaha » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!!
Logged

Pages: 1 2 [3] 4   Go Up
Jump to: