Initializing Osc, Wdt and Power up


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Unhappy

    I am using a 16F877A and this is a small program I wrote to test the MPASM.
    I compiled it with PM and it flashed the LED and sent the data out to my PC fine.
    I compiled using MPASM and the LED doesn't flash and the serial output is a constant string of 8 bit bytes with value 0.

    Are there settings for MPASM that I have missed?

    Regards

    Chris

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by crhomberg View Post
    I am using a 16F877A and this is a small program I wrote to test the MPASM. I compiled it with PM and it flashed the LED and sent the data out to my PC fine. I compiled using MPASM and the LED doesn't flash and the serial output is a constant string of 8 bit bytes with value 0. Are there settings for MPASM that I have missed? Regards
    Chris
    It would sure help if we could see the program, the configuration lines, the command line used to invoke PBP (if any), any notable options set in any program related to compiling this program...etc...etc...and anything else you can think of that might help...

  3. #3
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Red face

    Quote Originally Posted by crhomberg View Post
    I am using a 16F877A and this is a small program I wrote to test the MPASM.
    I compiled it with PM and it flashed the LED and sent the data out to my PC fine.
    I compiled using MPASM and the LED doesn't flash and the serial output is a constant string of 8 bit bytes with value 0.

    Are there settings for MPASM that I have missed?

    Regards

    Chris

    OOPS!

    Here is the code,

    '************************************************* ***************
    @ __config _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF
    define osc 20
    Include "modedefs.bas"

    COUNTER VAR BYTE

    COUNTER=0

    START:

    IF COUNTER= 250 THEN
    TOGGLE PORTD.0 'LED TO INDICATE LOOPING
    COUNTER=0
    ELSE
    Serout2 PORTA.0,16390,["COUNTER = ",DEC COUNTER,10,13] 'GOES TO MCSTUDIO SERIAL PROGRAM
    'SERIAL SPEED 38400, INVERTED, 8-BITS, NO PARITY
    COUNTER=COUNTER+1
    ENDIF

    GOTO START

  4. #4
    Join Date
    Apr 2007
    Location
    Santiago, Chile
    Posts
    77


    Did you find this post helpful? Yes | No

    Talking

    I found my problem, I had the settings for MPASM in MC studio set to case sensative. When I unchecked that all works fine.

    Thanks Guys

Similar Threads

  1. Pin won't stay high during Repeat...Until loop??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th August 2009, 23:57
  2. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  4. Minimum power modes for PIC18LF4620
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th February 2008, 01:30
  5. PIC10F206 - What is the LOWEST Power @ Rest or Sleep
    By rixtalbert in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 18th March 2007, 14:42

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