1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Guide Make your own USB LCD controller!

Discussion in 'Modding' started by ch424, 23 Jun 2006.

  1. Stormtrooper

    Stormtrooper Shh...

    Joined:
    26 Mar 2004
    Posts:
    414
    Likes Received:
    3
    I just thought I'd mention that the Arduino is another (potentially easier) way to control LCD screens through USB, even if it is a bit more expensive.
     
  2. dani piresk

    dani piresk Intel forever.

    Joined:
    10 Feb 2009
    Posts:
    1
    Likes Received:
    0
    This component "rotary encoder" is really necessary? I do not see it in Brazil.
    Thanks.
     
  3. gsila

    gsila What's a Dremel?

    Joined:
    22 Jun 2006
    Posts:
    14
    Likes Received:
    0
    rotary encoder is an option you can use buttons. there is diffrent code for buttons. code is somwere in this thread
     
  4. GizmoTheGreen

    GizmoTheGreen What's a Dremel?

    Joined:
    30 Mar 2009
    Posts:
    5
    Likes Received:
    0
    Hi!

    I have a pic18f4550

    the link for pcb + schematic + hex is down.

    could i have sourcecode for the 2550 so i can recompile?

    i should be able to reinterpret schematic for the 4550 by myself.
    why not post a public link to the source?
    instead of email (mine is gizmothegreen at hotmail dot com, btw)

    edit: it would also be good to know what caps can be electrolytics and which must be creamic, i saw someone mentioned vusb needed ceramic (yes, ive read the whole thread)

    thanks!
     
    Last edited: 30 Mar 2009
  5. on4top

    on4top What's a Dremel?

    Joined:
    15 Apr 2009
    Posts:
    1
    Likes Received:
    0
    pcb design

    Anyone can post me a Eagle or Express PCB single face . ?

    Regards

    Tom

    Belgium
     
  6. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    I have almost finished building one of these awesome controllers but have run into a bit of a snag. The LCD works great, but the communication with the computer is a bit odd. When I first plug in the device it boots up the chip just fine (flashes boxes which then disappear and becomes blank). But I cannot start LCD Smartie or anything that communicates with the chip for about 5 seconds without the program completely locking up. The COM port exists, its just if you try to connect through it you get a permanent I/O block.

    If I wait 5 secs it works fine, and I can get it to display whatever through LCD Smartie. After about a minute however the COM port just blocks continuously again. LCD Smartie freezes and the LCD display is stuck on whatever it was displaying.

    I have used everything as you guys have provided (hex and layout). It is currently on a breadboard. It is possible my wires are a bit too long, but it works flawlessly to start.

    Besides that problem, this is awesome. I am just learning how to do this stuff. It would be nice to get the source code (jeff@coderforlife.com) so that I could make button inputs instead of rotary, see if I can make a programmable brightness/contrast (someone in the thread said they did that), and remove the initial blankout (my LCD has a programmable startup screen that I would want displayed until LCD Smartie takes over).

    Awesome project! Here is it working:

    [​IMG]
    [​IMG]

    Currently I have the backlight hooked up directly to GND and the LCD I'm using is a dummy one.
     
  7. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Hey, that's excellent!

    The instability problems may be because it's on breadboard - have you checked that the USB wires are the same length? Do you have the 10nF cap on the 3.3V regulator (it looks like you do)? Try adding some more decoupling closer to the PIC as well. I've noticed the schematic is no longer up on the first page of the thread, so I'll fix that this evening or tomorrow!
     
  8. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    I shortened the USB cables and made sure they were the same length. I added some more capacitors, this increased the initial lag but increased the time I could use the display. Did you mean the 220 nF cap to 3.3v VUSB (not 10 nF). I tried 10 nF as well and it had no effect.

    I think its likely the breadboard at this point. I will be moving it to a PCB soon and it will hopefully all go away.

    Before I make a PCB I would like to play around a bit more with a few addition features. Using a PWM generator I have been able to completely change the contrast, so I think it wouldn't be too hard on to be able to control contrast through software. I would like to be able to get the source to be able to modify this (jeff@coderforlife.com).

    Thanks for your wonderful guide!
     
  9. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Yes, sorry, it should be 220nF not 10! You're probably right about the breadboard as well - I certainly had trouble with one breadboard, but when I transferred the circuit to some newer stuff, it worked fine, so who knows! Are you going to make a PCB or put it on stripboard?
     
  10. almamater

    almamater What's a Dremel?

    Joined:
    25 Apr 2009
    Posts:
    28
    Likes Received:
    0
    Hello!!

    I try to make this project but when i connect the USB cable nothing happens.. :(

    [​IMG]
    [​IMG]



    [​IMG]
    [​IMG]

    [​IMG]
    [​IMG]

    I just bought the PIC18F2550 in Microship site and put the .hex on it..


    any idea?

    Thanks
     
    Last edited: 25 Apr 2009
  11. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    Ch424:
    The equipment I have access to here has been used and abused. The first breadboard I put it on actually was so bad about 75% of the time Windows said device not recognizable, and I ended up messing with the circuitry so much I ended up switching GND and +5V accidentally at one point and killed the PIC! I found a different breadboard and the circuit worked the first time but I am still guessing its not the best breadboard.

    I have been designing it for a PCB board. The electronics club at my school has a PCB printer (a modified Epson inkjet) which they are going to try out on my design! So I am pretty excited to actually "print" one of these boards. This is my first real electronics project and I am having quite a bit of fun with it. I hope to be able to get the contrast software programmable as I really like the fade-transition in LCD Smartie (which requires contrast changes).


    Almamater:
    I don't use a resistor for the USB data pins. Also, your display seems to have no backlight showing up. Try to just plug the LED or BL or A/K pins in from the LCD to the USB GND and +5V to see if you have a glow. Then add the contrast (the potentiometer). So all you need is the pot, the USB port, and a few wires. You should be able to see the boxes when adjusting the pot. If not there is likely a problem with the display. When doing this simple setup you won't get a USB device in the computer, you are just stealing the power off the USB port. You could use a power supply instead.

    EDIT: You also need to connect the +5V and GND of the LCD to +5V and GND as well.

    If that works, then I don't know. I don't know enough about the rest of the circuit or the program...yet.
     
    Last edited: 25 Apr 2009
  12. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    almamater, I've fixed the schematic in the first post- have a look at it and make sure it's the same as yours!
     
  13. almamater

    almamater What's a Dremel?

    Joined:
    25 Apr 2009
    Posts:
    28
    Likes Received:
    0
    Thanks!!

    Now Windows can detect my PIC, i rebuild all circuit connections on a new breadboard.
    But now I have another problem.. LCDSmartie reports the error “The handle is invalid” when i choose Matrix.dll with the correct COM port (associated to Microchip)

    i will make some tests and reprogram the PIC..
     
  14. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    This can happen if you start up LCD Smartie too soon after plugging in the controller due to the capacitors charging up. Either remove the capacitors or wait longer (like 10-15 secs) before starting LCD Smartie.
     
  15. almamater

    almamater What's a Dremel?

    Joined:
    25 Apr 2009
    Posts:
    28
    Likes Received:
    0
    OK ok :thumb::thumb: Finally works: Video

    My mistake: i use 33pF capacitors and now i change them for the 22pF :grr:

    Thanks!!
     
    Last edited: 4 May 2009
  16. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    I have almost finished completely redesigning the USB2LCD. Once I am completely done I will post a schematic, a board, and a program hex. I ended up re-coding almost everything, however I use ch424's stuff as an excellent start. Some improvements I made:
    • Re-ordered the LCD pins on the chip to be in-order
    • Added programmable contrast via a pin
    • 5 button input, 5 outputs (3 draw from USB power, 2 draw from chip power)
    • Allow reading of the current state of the LCD/driver (can find out the current text, backlight, contrast, display, poll buttons, custom characters, GPO state, and display)
    • Allow saving all properties for startup in EEPROM (so you can save custom characters, message, contrast/backlight, GPO states, etc for use during boot-up before LCD Smartie takes over)
    • Allow reading EEPROM saved settings

    I made a program for the computer to allow using a number of these new features. It isn't nearly as powerful as LCD Smartie, but allows you to read and save all those settings. It is basically for testing and setting the saved message.

    Here is the breadboard version:
    [​IMG]

    Here is the planned circuit board:
    [​IMG]
    The hole on the left is where the pins on my LCD are. If you see any problems, please tell me.

    Here is the program I made:
    [​IMG]
     
  17. Scorpia

    Scorpia What's a Dremel?

    Joined:
    17 Jul 2006
    Posts:
    62
    Likes Received:
    0

    sounds like great news. Looks like it will be a nice step forward in the design of the system

    im wondering going forward if the source code will be available as well. One of the best things about the current board is for people who want to have a go the source is around if you ask nice enough. :)
     
  18. thaimin

    thaimin What's a Dremel?

    Joined:
    24 Apr 2009
    Posts:
    40
    Likes Received:
    1
    I would definitely be willing to make the source code available. I would not have been able to do what I did without ch424's code. I had never programmed a microchip before, and even if I had it would have taken much longer to figure out many things that I could simply look up in his code. However a few functions are verbatim (or very close) from ch424's code so I would like to make sure it is okay with him first to distribute the code. Like his, it is written in C18.

    I will definitely make the source code and program for my LCD control software available. It is written in MS C++ CLR (the .NET stuff, framework 2.0).

    There are still a few bugs I would like to work out as well. In addition to all of this, I would like to add a firmware update thing through the USB connection so once you program it once with a PIC programmer, you don't need the programmer again.
     
  19. almamater

    almamater What's a Dremel?

    Joined:
    25 Apr 2009
    Posts:
    28
    Likes Received:
    0
    Great project thaimin!
     
    Last edited: 19 May 2009
  20. Anttifast

    Anttifast What's a Dremel?

    Joined:
    2 Jun 2008
    Posts:
    3
    Likes Received:
    0
    Hi!

    Is it possible to have .hex file for a 5 button version? (pic 18f2550)
    I'm now using 3buttons, but I would like to have couple buttons more.
     
Tags:

Share This Page