12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Marconi??????
    Tesla!!!

    If you do not figure it out in a bit. Post the configs/code and tell us again how everything is connected.

    Being that it returned something once makes me think something might be loose.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Being that it returned something once makes me think something might be loose
    Well it could be. Although I've just realised that it only posted the 'yyyyy's when I reloaded the program.

    Speaking of program, could that be the problem (don't forget I'm still the worst programmer in the Northern hemisphere right now)

    Code:
    CMCON0 = %00000111 
    ANSEL = %00000000 
    TRISIO = %00000000 
    GPIO = %00000000
     
    DEFINE SER2_BITS 8
    
    MYVAR  VAR BYTE 
     
    MAIN
    
    serin2 GPIO.0, 2400,[DEC MYVAR] 
    
    IF MYVAR = 3 THEN HIGH GPIO.5
    Tesla_Dave

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Hint...
    Code:
    serin2 GPIO.0, 2400,[DEC MYVAR]
    Take another look at the manual and appendix B , I think it is B, MODE number.

    Then add a short pause maybe 1/4 second, and a GOTO MAIN

    MAIN:
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I've tried this but it doesn't compile, do I need the 2400baud as well?

    serin2 GPIO.0, Mode = 396, [DEC MYVAR]
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I've tried this but it doesn't compile, do I need the 2400baud as well?

    Code:
    serin2 GPIO.0, Mode = 396, [DEC MYVAR]

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    From the manual
    ' Wait until the character “A” is received serially on Pin1 and put next character into B0
    SERIN2 1,16780,[wait (“A”),B0]

    ' Skip 2 chars and grab a 4 digit decimal number
    SERIN2 PORTA.1,84,[skip 2,dec4 B0]

    SERIN2 PORTA.1\PORTA.0,84,100,tlabel,[wait (“x”, b0), str ar]
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    This was my last go for tonight (wouldn't compile though).

    I'm going to sleep on it.

    Cheers again mackrackit, see you tomorrow.

    Code:
    CMCON0 = %00000111 
    ANSEL = %00000000 
    TRISIO = %00000000 
    GPIO = %00000000
     
    DEFINE SER2_BITS 8
    
    con mode = 396
    
    MYVAR  VAR BYTE 
     
    MAIN
    
    serin2 GPIO.0, 2400,mode, [DEC MYVAR]
    
    IF MYVAR = 3 THEN HIGH GPIO.5
    PAUSE 250
    GOTO MAIN
    Tesla_Dave

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Might be another problem...

    If all of the PicKIt1 are the same, mine has GPIO.0 connected to the on-board POT (RP1).

    Your code is still a bit off, but code will not fix hardware.

    Maybe I am looking at the hardware wrong, exactly what do you have? Maybe a picture?
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I've re-cheched my connections:

    PIC12F683 on my PICKit1.

    I've got common pin5 on the DB9 cable (yellow) going to VSS PIC pin8.

    I've got pin3 on the DB9 cable (red) going to GPIO.0 PIC pin7.

    And pin2 on the DB9 cable (brown) going to GPIO.2 PIC pin5.


    Pin 5
    Common, ground, zero rail...
    This must be connected to both devices for any serial to work.

    Pin 2
    Data is sent to the PC via this pin. PIC® -->> PC

    Pin 3
    Data is sent to the PIC® via this pin. PIC® <<-- PC
    So data is coming from the pc onto GPIO.0

    data is going from the PIC to pc on GPIO.2

    How does that look / sound?

    Dave
    Last edited by LEDave; - 11th April 2010 at 19:58.

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