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

    How big a step forward is getting the Com Port to open and shut?
    Sounds like you are getting there.

    I did download VB 2010, looked at it a bit, watched a tutorial or two, and shut it down.

    If you are learning from scratch and do not mind windows only then keep at it. IMHO
    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

    Sounds like you are getting there.
    I've got that sinking feeling there's some way to go yet. It would be nice to be pleasantly surprised though.

    I think it (the program) needs some sort of event handler / buffer to store and read the data_in in bytes and then make words.

    If you are learning from scratch and do not mind windows only then keep at it. IMHO
    I'll stick at the VB2008 for now and see what I can 'cobble' together.

    Dave

  3. #3
    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 now become officially obsessed with getting the VB program to receive data from the PIC. I'm going to stick at it until I do. I still haven't got much beyond opening and closing the COM port at the moment though, still doing loads of reading.

    I'll get there (one day).

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    officially obsessed

    Probably not something for a business card.

    Opening and closing the port. Sounds like you are almost there.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    The worlds most 'Obsessive' but slow programmer has now got a ' ListBox' that is receiving data from the PIC. Ok, it's mainly gibberish interspersed with the odd number but it's progress (I know, evolution happens faster then my programs)

    Probably not something for a business card
    I agree. How about a perfume....? Maybe not thinking about it

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    COOL!!!!
    But why are you sending gibberish to the PC?

    yea, a par fume. Love that new chip smell

    Just wondering if the VB program has the port set different than the chip?
    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

    Hi mackrackit,

    The VB Port is set at:

    Code:
    SerialPort1.PortName = "COM1"
            SerialPort1.Parity = IO.Ports.Parity.None
            SerialPort1.BaudRate = 2400
            SerialPort1.DataBits = 8
            SerialPort1.StopBits = 1
    The PIC is:

    Code:
    SEROUT2 PORTC.3, 16780, [DEC z, 10, 13]
    Does that look ok?

    Dave

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    That looks about right for that chip. You should have save available though! Maybe you need to have some code in the window for that. Looks like most of the greyed out options are for the in circuit debuger. Some other chips: 16F627(A), 16F628(A), 16F73, 16F74, 16F76, 16F77, 16F870, 16F871, 16F873(A), 16F874(A), 16F876(A), 16F877(A), 16F87, 16F88, 18F242, 18F248, 18F252, 18F258, 18F442, 18F448, 18F452, 18F458, 18F1220, 18F1320, 18F2220, 18F2320, 18F4220, 18F4320, 18F6620 and 18F8620

    have an in circuit debug available for them, but as you can see, they are a bit limited. It is an interesting feature though.

    Walter

    Name:  mybar.PNG
Views: 994
Size:  32.7 KB
    Last edited by ScaleRobotics; - 3rd November 2010 at 00:58.
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    Hi Walter

    You should have save available though! Maybe you need to have some code in the window for that.
    Exactly that, I added some code and 'Save' changed from greyed out to Bold.

    That was interesting, I changed the chip from a 12F675 to a 16F627(A) and the RUN-STOP-STEP-PAUSE changed from greyed out to Bold,
    like you said then that must be because the chip has a Debug available to them (I've never used Debug).

    Cheers: Dave
    Last edited by LEDave; - 3rd November 2010 at 01:55.

  10. #10
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LEDave View Post
    (I've never used Debug).
    Hi Dave,

    Bruce did a great write up on how to use it here: http://www.rentron.com/PicBasic/MCS_X3.htm

    I used to use it, and it is pretty cool. When I needed to try to debug things that were using the serial port already, I had to find other ways to debug (not necessarily better). But I would say it can be pretty helpful when you are starting out.

    The way it debugs is that it adds code into your program to talk back and forth through the serial port. That way it updates registers, etc so you can see them in the ICD. It uses a fair amount of resources, so it slows things down a great deal, but it is fast enough for a lot of projects.
    Last edited by ScaleRobotics; - 3rd November 2010 at 02:10.
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    Thanks for that Walter and the link, very interesting and something else to look into.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    We've touched on this before, when I compile Bruce's TX program I get these errors (see attachment). This is because as mackrackit said earlier in the thread:

    Bruce is using PM for an assembler in that example.
    And:

    PM is the assembler from the Pic Basic folks. It works well on the older and smaller chips.
    Also:

    MPASM from MicroChip works for everything.
    So the compiler error is due (I think) to having the wrong type of configuration fuse in Bruce's program (see second attachment) and I need to change them to this type (see third attachment) and it will compile.

    Have I got that right?

    Dave
    Attached Images Attached Images   
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    You will want to change these lines in your code
    Code:
    @ DEVICE PIC12F675,MCLR_OFF,INTRC_OSC_NOCLKOUT,WDT_OFF,BOD_OFF
    @ DEVICE PWRT_ON,PROTECT_OFF
    to
    Code:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
    when using MPASM as an assembler.

    And comment the *.inc file in the PBP directory.

    http://www.picbasic.co.uk/forum/cont...o-your-Program
    Dave
    Always wear safety glasses while programming.

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