lost in lcd land


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    >your a sweetheart.

    I know.

    >it works fine using this method now for the million dollar question why??/

    Because I programmed it.

    >dont know what to do to get it to function out of microstudio

    Neither do I - I don't use those things...

    >any help?//\

    Not with Microcode studio

    >thanks

    You're welcome

    Now let's move on and get your LCD working... connect it as per Page 96 of the manual, copy and save the below code, and compile as before... Remove the LED from PortA.0 but keep the one on PortB.0 - the blinking LED is there to tell you it's all working...

    Code:
    	'
    	'	Device Programming Options
    	'	--------------------------
    	@ DEVICE pic16F628, INTRC_OSC_NOCLKOUT
    			' System Clock Options	
    	@ DEVICE pic16F628, WDT_ON
    			' Watchdog Timer
    	@ DEVICE pic16F628, PWRT_ON
    			' Power-On Timer
    	@ DEVICE pic16F628, BOD_ON
    			' Brown-Out Detect
    	@ DEVICE pic16F628, MCLR_OFF
    			' Master Clear Options (Internal)
    	@ DEVICE pic16F628, LVP_OFF
    			' Low-Voltage Programming
    	@ DEVICE pic16F628, CPD_OFF
    			' Data Memory Code Protect
    	@ DEVICE pic16F628, PROTECT_OFF
    			' Program Code Protection
    
    	'
    	'	Hardware Assignments
    	'	--------------------
    	LEDB var PortB.0
    		'
    		' 	LCD Display
    		'	-----------
    	Define LCD_DREG PORTA		' Port for LCD Data
    	Define LCD_DBIT 0		' Use upper 4 bits of Port
    	Define LCD_RSREG PORTA		' Port for RegisterSelect (RS) bit
    	Define LCD_RSBIT 4		' Port Pin for RS bit
    	Define LCD_EREG PORTB		' Port for Enable (E) bit
    	Define LCD_EBIT 3		' Port Pin for E bit
    	Define LCB_BITS 4		' Using 4-bit bus
    	Define LCD_LINES 2		' Using 2 line Display
    	Define LCD_COMMANDUS 2000	' Command Delay (uS)
    	Define LCD_DATAUS 50		' Data Delay (uS)
    
    	'
    	'	Initialise PIC
    	'	--------------
    	TRISA=%00000000			' PortA all OUTPUT
    	TRISB=%00000000			' PortB all OUTPUT
    	CMCON=%00000111			' Comparators OFF
    	Pause 2000			' wait for LCD to wake-up
    	'
    	'	Main Program
    	'	------------
    Loop:
    	LCDOut $FE,1,"Hello"
    	Pause 500
    	LCDOut $FE,1
    	Toggle LEDB
    	Pause 500
    	Goto Loop
    
    	'
    	End

  2. #2


    Did you find this post helpful? Yes | No

    Talking Thanks

    Still Having Lcd Problems But At Least The Chip Is Now Functioning
    Led Flashing Will Trace Out And Maybe Find Whats Hapeing With It
    Again Thanks
    Will Advise On Progress

  3. #3


    Did you find this post helpful? Yes | No

    Thumbs up Happy Days Are Here Again

    Wow Beauty And Brains
    Got It Working Thanks Thanks

    Now The 2 Million Dollar Question (no Not That One)

    Where Do You Get Manuals For What Your Doing Does Not Seem To Be Whats Happeing With What I Purchased

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Well tell me what you purchased...

    On my part I'm using PBP2.46 with the latest patches taken from the MeLabs website. The manuals are what comes with the product or again downloaded from the MeLabs website. The DATASHEETS for the PICs come from the Microchip Website. I do not use Microcode studio. All code in my examples comes from the Manual or the Datasheet. You should have EXACTLY the same as I have - except you additionally have MCS which dosen't turn me on.

    I also look at what the installation disks have put on my PC. There's stuff to be learnt from that... Readme files and documentation and examples... look and learn...

  5. #5


    Did you find this post helpful? Yes | No

    Arrow thanks

    i have the same thing pbp 2.4 just let in install itself it set up microstudio as the windows interface will searc the cd for more info

    thanks again lady

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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