pic+shift register+lcd


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Default pic+shift register+lcd

    Hi guys
    I am using pic12f675 and a shift register from 74 series. I don't know why my shift register doesn't do anything. I am sure that the program is wrong but I can not find any sample program in pbp that used a shift registre (74ls794).I am not sure if the problem is about the clock or it's just about the IC . Here is the code:

    @ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _PWRTE_OFF & _BODEN_OFF

    INCLUDE "modedefs.bas" ' Include serial modes

    TRISIO = %11010000
    OPTION_REG.7=0 ' Enable pull-ups
    WPU=%00010000 ' Enable pull-ups on GP0, GP1,GP4
    CMCON=%00000100
    VRCON=%10100000
    ANSEL=0
    ' Define LCD connections
    DEFINE LCD_CLK GPIO.1
    DEFINE LCD_D GPIO.2
    DEFINE LCD_BITS 4


    DEFINE LCD_DREG GPIO
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG GPIO
    DEFINE LCD_RSBIT 5
    DEFINE LCD_EREG GPIO
    DEFINE LCD_EBIT 0
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_LCDUS 50


    Main:
    PAUSE 500


    SEROUT GPIO.2,N2400,[$FE,1]
    PAUSE 50
    SEROUT GPIO.2,N2400,["HELLO,",10,13]
    PAUSE 50
    SEROUT GPIO.2,N2400,["WORLD,",10,13,10,13]
    PAUSE 500
    GOTO Main

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: pic+shift register+lcd

    The 74ls794 is not a shift register and the SHIFTIN/SHIFTOUT command is commonly used with shift registers.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2012
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: pic+shift register+lcd

    Hi
    I am sorry ,It was my mistake, the shift register is 74ls194 and thank you for reply.I'll test shiftout command.

Similar Threads

  1. weird problem with dot matrix and shift register
    By Ahmadabuomar in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th November 2010, 19:00
  2. Long shift register
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th April 2009, 19:14
  3. Replacing shift register with PIC
    By TonyA in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th April 2008, 18:31
  4. Shift Register Woes, specifically the STP16DP05
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th November 2007, 23:22
  5. Replies: 15
    Last Post: - 30th January 2005, 03:58

Members who have read this thread : 0

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