Jump to content
TCSCOUT

Picaxe & Lcd's

Recommended Posts

Glad you guys got some, thought I was going to have a hard time selling these things on eBay :lol:

Just kidding, :lol:

Share this post


Link to post
Share on other sites
 
 
 
 
:coolsmiley:

Share this post


Link to post
Share on other sites
 
I have been wanting to try this for a while now. Saw these LCD's on ebay for under $3 each so.....

I don't know what I really want to do with it. Maybe use it to show the count of pics or videos, low battery whatever?

post-5460-1329599626_thumb.jpg

2 questions, what is the red board top right of pic?

 

and did you use the HD44780 datasheet or find a schematic from samsung to identify hookup points?

Share this post


Link to post
Share on other sites
 
I have been wanting to try this for a while now. Saw these LCD's on ebay for under $3 each so.....

I don't know what I really want to do with it. Maybe use it to show the count of pics or videos, low battery whatever?

post-5460-1329599626_thumb.jpg

2 questions, what is the red board top right of pic?

 

and did you use the HD44780 datasheet or find a schematic from samsung to identify hookup points?

 

Yes I looked at the HD44780 datasheet but I used this to wire it up.

http://picaxe.placona.co.uk/5/picaxe/picax...nd-hd44780-lcd/

The diagram right below the pic of the perf board.

The red board on top right is just a USB Picaxe Programmer, but in the pic it is only supplying 5 volts to the board through my USB plug so I don't have to use any batteries. It's supplying 5 volts to the LCD and 5 volts to the 14M Project Board that I cut the end off of. I'm using the plug on the 14M project board to program the picaxe.

 

Here is the Hello Hag's House if you want to test it?

 

        SYMBOL  RS        = 0        ; 0 = Command   1 = Data
        SYMBOL  E         = 1        ; 0 = Idle      1 = Active
        SYMBOL  DB4       = 2        ; LCD Data Line 4
        SYMBOL  DB5       = 3        ; LCD Data Line 5
        SYMBOL  DB6       = 4        ; LCD Data Line 6
        SYMBOL  DB7       = 5        ; LCD Data Line 7

        SYMBOL  RSCMDmask = %00000000; Select Command register
        SYMBOL  RSDATmask = %00000001; Select Data register

        SYMBOL  get       = b11
        SYMBOL  char      = b12
        SYMBOL  rsbit     = b13

    PowerOnReset:

        GOSUB InitialiseLcd

    DisplayTopLine:

        EEPROM 6,("Hello")

        FOR get = 6 TO 10
          READ get,char
          GOSUB SendDataByte
        NEXT

    MoveCursorToStartOfSecondLine:

        char = $C0
        GOSUB SendCmdByte

    DisplayBottomLine:

        EEPROM 11,("   Hag's House  ")

        FOR get = 11 TO 26
          READ get,char
          GOSUB SendDataByte
        NEXT

        END

    InitialiseLcd:

        FOR get = 0 TO 5
          READ get,char
          GOSUB SendInitCmdByte
        NEXT

        ' Nibble commands - To initialise 4-bit mode

        EEPROM 0,( $33 )   ; %0011---- %0011----   8-bit / 8-bit
        EEPROM 1,( $32 )   ; %0011---- %0010----   8-bit / 4-bit

        ' Byte commands - To configure the LCD

        EEPROM 2,( $28 )   ; %00101000 %001LNF00   Display Format
        EEPROM 3,( $0C )   ; %00001100 %00001DCB   Display On
        EEPROM 4,( $06 )   ; %00000110 %000001IS   Cursor Move

                           ; L : 0 = 4-bit Mode    1 = 8-bit Mode
                           ; N : 0 = 1 Line        1 = 2 Lines
                           ; F : 0 = 5x7 Pixels    1 = N/A
                           ; D : 0 = Display Off   1 = Display On
                           ; C : 0 = Cursor Off    1 = Cursor On
                           ; B : 0 = Cursor Steady 1 = Cursor Flash
                           ; I : 0 = Dec Cursor    1 = Inc Cursor
                           ; S : 0 = Cursor Move   1 = Display Shift

        EEPROM 5,( $01 )   ; Clear Screen

        RETURN

    SendInitCmdByte:

        PAUSE 15                       ; Delay 15mS

    SendCmdByte:

        rsbit = RSCMDmask              ; Send to Command register

    SendDataByte:

        pins = char & $F0 / 4 | rsbit  ; Put MSB out first
        PULSOUT E,1                    ; Give a 10uS pulse on E
        pins = char & $0F * 4 | rsbit  ; Put LSB out second
        PULSOUT E,1                    ; Give a 10uS pulse on E

        rsbit = RSDATmask              ; Send to Data register next

        RETURN

Share this post


Link to post
Share on other sites
 

Roger, isn't that the same way the Picaxe manual #3 shows how to wire it to the picaxe? If I am reading it right it is the same.

Share this post


Link to post
Share on other sites
 
 
 
Roger, isn't that the same way the Picaxe manual #3 shows how to wire it to the picaxe? If I am reading it right it is the same.

 

 

Did you use the 10K pot? I can't tell from your pics.

 

 

Thanks TC, that should save some headaches B)

 

Yes I have a pot for the contrast, I don't know what size it is, one end connects to ground so I just used one I had and it works fine, just has a few extra turns but once it's adjusted.....

I think it was the same but the unused points on the LCD were grounded on the picaxe drawing, so I grounded them, didn't see any difference.

Mark, programming is a real challenge. I was already thinking of using a chip piggybacked on the LCD then I ran into this article on using a 14M2, I'm using a 14M right now. Looks like this mod would let you send serial data to the 14M2 on the LCD and that way use a whole lot less programming and would be easier to do? I may order a couple of 14M2's, I need a few 20X2's anyway.

Here is the article: http://www.jrhackett.net/LCD16.shtml

It looks like what I already have with the cutoff 14M board except for a couple resistor on the serial connection.

Share this post


Link to post
Share on other sites
 

Well I found what looks like the 14M code for the serial mod to the LCD. It's on this page:

http://www.jrhackett.net/seriallcd.shtml

I loaded the one that say test on the 14M and this came up flashing on the LCD.

 

post-5460-1329721089_thumb.jpg

 

I will have to do some testing when I get a chance. Maybe I won't need the 14M2 and just use the 14M?

Share this post


Link to post
Share on other sites
 

Cool tcscout! I've been playing around with the LCDs for a while now, but only using them with serial communication using a 18M2 on the LCD. Great work on getting these put together. The serial communication makes using the LCD very easy with simple and easy commands. I just tried the new OLED screens that phanderson sells. I bought two kits to try because in the cold the LCD was very dim at times and hard to read. It really hasn't been cold enough to really test the OLED ones yet, but I figured they might be better. The OLED display as far brightness and contrast is really nice.

 

A few things I learned playing around with them are the changing of chips (20X2 vs 20M2) and the type of screens (LCD vs OLED) makes a difference in the Baud rate you use to talk to them. Basically LED is different than LCD and the frequency of the chip changes everything. If it's not right you will get garbage characters on the screen, but a simple change of the baud rate will fix it. I use them to show selected numbers through push buttons. Push a button to select how many seconds or minutes for cameras and then display the value so I know what value I have in say b1. If you want to display the number in b1 you have to use (#b1). I just finished up building a RF remote for an ecaller I'm building. I bought a keypad and using different resistors you can read the value on an ADC pin to select say number 1 on the keypad. I then display it on the LED screen and then push the send button and it sends the 1 to the caller to play song 1. It works pretty slick, but I aged a lot building it. :)

Share this post


Link to post
Share on other sites
 

Thanks KZ3, I figured there were a couple of folks out there who have played with them. I really don't know what I'm doing yet. The more I read and think I know the more I realize that I don't have a clue. If I can get this 14M to work as a Serial LCD that might help. I know that I can just buy one, but the LCD's I bought were pretty cheap and this should do the same thing, I think? Hope to figure out just enough to have some fun with it and have it do something useful. We will probably have a question or two for you later on. Right now I don't know enough to ask any :huh: .

Share this post


Link to post
Share on other sites
 

Need to build me one of these :lol: !

 

!

Share this post


Link to post
Share on other sites
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×