pic first build test board not running


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1

    Default pic first build test board not running

    hi everyone...
    I finally got all the hardware and wrote a little test program for my pic (16f877A)
    i built a llittle test board with 8 3mm red LED's
    The test program i wrote is a simple knight rider led sequence...
    I'm using a 20MHz crystal with 2 X 10pf caps. the programmer was set to HS crystal...

    The software runs fine in my pic simulator software but i get no signes of life...
    it's running off a since lithium ion cell with a voltage under load at 4.3 volts.

    i've double checked the voltage is going to both sets of pins, i've re-verified the pic program by putting pic back in the prodrammer...

    I've experience building circuits with the Z80180...

    Does anyone have any ideas to find whats wrong?
    Thanks

  2. #2


    Did you find this post helpful? Yes | No

    Default

    i double checked the led's... they all light up...
    multimeter reads 1.8v DC, 0V AC on osc1... 0.8V DC, 0V AC on OSC2 compairred to VSS
    my multimeter may not be sensitive enough to detect a 20MHz xtal fluctuations

  3. #3
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Code? and try

    Try to turn on only one (or all) at the same time and leave them on. Toggle pins on the same port rapidy after each other can give RMW (read modify write) problems when running the pic at 20 MHz.

    So all on or one, but leave the blink blink for step 2

    /me
    Last edited by Jumper; - 28th June 2009 at 14:41.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    here is the program i threw together in about 2 mins just for a test sequence...

    Code:
    Define  OSC				20
    Define CONF_WORD = 0x3F72
    
    ALLDIGITAL
    TrisA	=	%00000000					'Set everything on port A as output
    TrisB	=	%00000000					'Set everything on port B as output
    TrisC	=	%00000000					'Set everything on port C as output
    TrisD	=	%00000000					'Set everything on port D as output
    TrisE	=	%00000000
    
    main:
    low 0
    low 1
    low 2
    low 3
    low 4
    low 5
    low 6
    low 7
    
    High 0
    pause 500
    Low 0
    high 1
    pause 500
    low 1
    high 2
    pause 500
    low 2
    high 3
    pause 500
    low 3
    high 4
    pause 500
    low 4
    high 5
    pause 500
    low 5
    high 6
    pause 500
    low 6
    high 7
    pause 500
    Low 7
    high 6
    pause 500
    low 6
    high 5
    pause 500
    low 5
    high 4
    pause 500
    low 4
    high 3
    pause 500
    low 3
    high 2
    pause 500
    low 2
    high 1
    pause 500
    low 1
    
    goto main
    END
    Reprogramming to turn all on and enter nop loop

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    1. The 877A has multiple Ground and Power pins, make sure you have them all connected.

    2. You did remember to do something meaningful with the MCLR pin?

    3. Whilst you have defined OSC 20 for your program, you need to set HS OSC in the PIC Configuration Fuses. Whilst your program compiles wihout error, it didn't do much for the CONFIG Fuse settings for my programmer which remained at XT OSC.

    4. I don't recall what the default Brown-Out is for that PIC (again my programmer reported it ENABLED by Default)... you might need to turn it OFF to run at 4.3v.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    jumper:
    I threw this code in and compiled it...

    Code:
    Define  OSC				20
    Define CONF_WORD = 0x3F72
    
    main:
    TrisB	=	%00000000					'Set everything on port B as output
    PORTB = 255
    goto main
    oshon pic simulator reports all LED's on port B light up...
    again, nothing on my test board...

    Mel:
    I'm using WinPIC800 and JDM programmer...
    I'm loading the program and then clicking on settings and selecting HS under OSC...
    Please correct me if i've wrong, but i thaught the CONF_WORD set the OCS type?

    Thanks

Similar Threads

  1. Replies: 6
    Last Post: - 20th December 2007, 21:56
  2. Two PIC 16F877A fried in two days!
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th January 2007, 10:38
  3. Replies: 8
    Last Post: - 5th January 2007, 05:10
  4. Replies: 8
    Last Post: - 7th December 2006, 15:42
  5. Build PIC bootloader firmware in PBP?
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th August 2006, 19:53

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