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

    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

  2. #2
    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: - 17th August 2009, 00: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, 10:00
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 08:12
  4. Minimum power modes for PIC18LF4620
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th February 2008, 02: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, 15: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