+ Reply to Thread
Results 1 to 3 of 3

Thread: PIC16F88 with UART and LCD Working

  1. #1
    Licensed User Secoroco's Avatar
    Join Date
    Sep 2010
    Location
    San Fernando Valley, CA
    Posts
    21

    Default PIC16F88 with UART and LCD Working

    Hey guys, after some headaches and programming hours I thought I should share some code that works. This Program reads UART characters and prints them into an LCD.

    Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

    Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

    Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS






    Code:
    Device 16F88
      
      Xtal = 8
        
      Hserial_Baud   = 38400 
      Hserial_RCSTA  = 010000
      Hserial_TXSTA  = 100100
      Hserial_Clear  = On
      All_Digital   true
      DelayMS 2000  'Some time to let it sattle
       Hserial_SPBRG = 12' 
      
      Declare LCD_Type 0 ' Type of LCD Used is Alpha
      Declare LCD_DTPin PORTA.0 ' The control bits B0,B1,B2,B3
      Declare LCD_RSPin PORTB.0 ' RS pin on B4
      Declare LCD_ENPin PORTB.1 ' E pin on B5
      Declare LCD_Interface 4 ' Interface method is 4 bit
      Declare LCD_Lines 2
      Cls
      Print At 2,1,"Hola"
      
      Output PORTB
      Input  PORTB.2
    
      Dim VAR1 As Byte
      Dim COL  As Byte
      Dim ROW  As Byte
      
      COL = 0
      ROW = 0
    
    infinite:
      PORTB.3 = 0
      HSerIn [VAR1]
      Print At 1,COL,VAR1
      Inc COL
      If COL = 17 Then COL = 0
    
    GoTo infinite
    End


  2. If you're a Licensed user of PROTON DEVELOPMENT SUITE, apply for Licensed User Status to remove these pesky messages
     and get access to additional forum areas, Beta test downloads and more!

  3. #2
    Super Moderator John Drew's Avatar
    Join Date
    Feb 2002
    Location
    Millicent, South Australia
    Posts
    911


    Default Re: PIC16F88 with UART and LCD Working

    Well done Secoroco
    Simple, but an important example for newcomers to programming. You could add this in the LCD section of the Wiki.
    John

  4. #3
    Licensed User Secoroco's Avatar
    Join Date
    Sep 2010
    Location
    San Fernando Valley, CA
    Posts
    21


    Default Re: PIC16F88 with UART and LCD Working

    Thanks John,

    I have learned a lot from this forum. So, I thought somebody will use it.

    Cheers,

    Saul

+ Reply to Thread

Similar Threads

  1. PIC16F88 slow startup
    By See_Mos in forum Proton Plus Compiler v3
    Replies: 11
    Last Post: 6th February 2012, 20:22
  2. PIC16F88 UART not functioning
    By Secoroco in forum Serial / Ethernet
    Replies: 0
    Last Post: 9th January 2012, 04:13
  3. I2C on the PIC16F88
    By Developer in forum The Lounge
    Replies: 14
    Last Post: 22nd August 2011, 16:30
  4. PIC16F88 Not Starting
    By t0pP8uZz in forum Proton Plus Compiler v3
    Replies: 23
    Last Post: 23rd January 2010, 10:42
  5. PIC16f88 ICSP PROGRAMMING
    By all77 in forum The Lounge
    Replies: 0
    Last Post: 19th April 2007, 15:59

Members who have read this thread : 26

Actions :  (Set Date)

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts