PIC16F88 senior design


Results 1 to 40 of 72

Threaded View

  1. #23
    skimask's Avatar
    skimask Guest

    Default

    Start small and work your way up!
    I don't know how much programming you've done, if you've made a blinky LED, follow a switch, etc.etc.
    The program below should (according to the datasheet) reset the LCD back to defaults (forget about that switch, the backlight, the serial communications, etc.) and just output the alphabet, one character every 1/4 second and repeat itself over and over again...

    @ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
    @ DEVICE PIC16F88,PROTECT_OFF
    @ DEVICE PIC16F88,WDT_OFF
    @ DEVICE PIC16F88,PWRT_ON
    @ DEVICE PIC16F88,MCLR_ON
    @ DEVICE PIC16F88,BOD_OFF
    @ DEVICE PIC16F88,LVP_OFF
    @ DEVICE PIC16F88,CPD_OFF
    @ DEVICE PIC16F88,DEBUG_OFF
    @ DEVICE PIC16F88,CCPMX_OFF
    OSCCON = %01100000 '4MHz
    INCLUDE "modedefs.bas"
    ANSEL = %00000000
    TRISB.1 = 0
    TRISB.0 = 1
    dataout var byte

    Waitloop:
    serout portb.1 , n9600 , [ $32 ] 'according to serlcdv2.5 datasheet, should reset LCD back to 9600 (defaults) if it's stuck on some other baud rate

    for dataout = 64 to 89
    serout portb.1 , n9600 , [ dataout ]
    pause 250
    next dataout

    goto waitloop
    end


    Also, according to the datasheet, are you even seeing the 'splashscreen' during power up? If not, you've got other problems. Read the datasheet, you'll see it.

    EDIT:
    I forgot to mention...
    The 4mhz internal oscillator isn't exactly accurate. If you're getting random characters, that might be the reason.
    9600 baud is at the upper end of SEROUT's usability at 4mhz. In this case, it should be ok, but if your 4mhz internal oscillator is a bit low, it might end up being TOO low.
    Last edited by skimask; - 26th April 2007 at 05:14. Reason: Added comments

Similar Threads

  1. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 01:13
  2. pic16f88 & voltage
    By rdxbam in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th February 2009, 10:14
  3. Ghange code from PIC16F877A to PIC16F88
    By savnik in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th March 2008, 17:09
  4. Replies: 8
    Last Post: - 7th December 2006, 16:42
  5. PIC16F88 problem with TOGGLE command?
    By russman613 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th September 2006, 00:31

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