Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes it does oscillate
    when I put thisline:

    @ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF

    and not:
    DEFINE OSC 20

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    led on RC3,.. do not work

    @ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF
    'HS 20mhz, watchdog off, powerup timer on, mclr external, brown out detect on, low volt program off , code protect off

    INCLUDE "modedefs.bas"

    DEFINE LCD_DREG PORTC ' Set LCD Data port
    DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
    DEFINE LCD_RSBIT 1 ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTB ' Set LCD Enable port
    DEFINE LCD_EBIT 0 ' Set LCD Enable bit
    DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 2 ' Set number of lines on LCD
    DEFINE LCD_COMMANDUS 2500
    DEFINE LCD_DATAUS 250
    DEFINE CHAR_PACING 2000

    TRISC =0

    Pause 1000 ' Wait 1 second

    loop:

    lcdout $FE,1, "Number: ", dec 55
    pause 100

    portc.3=0
    portc.3=1
    pause 300
    portc.3=0

    goto loop

    end

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    even this do not work...
    compiles and everything, but no action

    @ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF
    'HS 20mhz, watchdog off, powerup timer on, mclr external, brown out detect on, low volt program off , code protect off
    DEFINE OSC 20
    INCLUDE "modedefs.bas"
    TRISC =0
    loop:

    portc.3=1 'Blink led
    pause 300
    portC.3=0
    pause 300

    goto loop

    end
    Last edited by lerameur; - 7th January 2007 at 02:48.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    yes it does oscillate
    when I put thisline:

    @ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF

    and not:
    DEFINE OSC 20
    DEFINE OSC 20 is for PBP and it's internal compiler and setting up various timing loops; it doesn't set any config bits anywhere in the PIC.

    Leave both in there.

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    then why doesn't the program in post 242 work ??

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    then why doesn't the program in post 242 work ??
    osc running at ~20mhz?
    are you using a crystal or one of those can oscillators?
    all other things being equal, it's probably the programmer's fault (not you, I mean the actual hardware)

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    i am using a crystal 20.0Mhz
    programmer ? I have another one ...

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    ok TRied the easy Prog Programmer,
    http://www.embedinc.com/easyprog/index.htm
    does not work more, same thing, I meam .. nothing is happening...
    Last edited by lerameur; - 7th January 2007 at 04:48.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    ok TRied the easy Prog Programmer,
    http://www.embedinc.com/easyprog/index.htm
    does not work more, same thing, I meam .. nothing is happening...
    Just curious, is the chip a 16F876 or a 16F876A.... there's a difference as far as programming method goes...

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

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