Mplab Sim


Closed Thread
Results 1 to 16 of 16

Thread: Mplab Sim

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile I/O Salad indeed ...

    More to try

    1)Turn the Comparators OFF to get PORTA to work as intended

    2)
    Code:
    TRISA = %11111111
    You set all of PORTA inputs here but make them outputs in your code

    3)
    Code:
    TRISB = %11000000 'portb.6 and .7 out puts all others in put
    You got the comment backwards (0=output, 1 = Input)

    4)Remember RA4 is open drain so it needs a pullup on your real circuit

    5)
    Oh, and it it were me, I would start with this and make this work with the Simulator
    Code:
    TRISB=1
    MAIN:
    IF PORTB.0 = 1 then
    	PORTB.1=1
    ELSE
    	PORTB.1=0
    ENDIF
    GOTO MAIN
    Post back after you try some of these
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  2. #2
    Join Date
    Apr 2007
    Posts
    5


    Did you find this post helpful? Yes | No

    Question Mplab Sim

    I have made these changes:
    1 trisa is now %00000000
    2 trisb is now %00111111
    3 pir is now pirin this should reduse any confusition.
    Would this be correct? I will later change armed from porta.4 to portb.6 to not have to use a pull up resister and reduse current draw to a min.

Similar Threads

  1. MPLAB SIM timing vs Real life
    By Bronurstomp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th July 2008, 16:32
  2. MPLab SIM question
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2007, 21:22
  3. Linker/COFF debugging in MPLAB SIM
    By RichardBowser in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th January 2007, 18:28
  4. Tracing code in MPLAB Sim
    By ErnieM in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th August 2005, 16:00
  5. pause loop lockup with mplab sim
    By power67 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th February 2005, 13:10

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