No announcement yet.

Blink.bas PIC's

  • Filter
  • Time
  • Show
Clear All
new posts

  • Blink.bas PIC's

    Using Chuck Hellebuyck Demo Version

    Which PIC should I use for this?

    This is what we have now.

    12F683 16F886 16F887

  • #2
    Go to and get the Data Sheets for all three. Look over the Special Function Registers, pin functions, and so forth. If you already have an electronics background, you should have no problems adapting the breadboard to work with just about any PIC Processor. If you are not "functional" with basic electronics, and you get frustrated (as I did) trying to get those older processors working, read Chuck's book. It explains Special Function Registers, Timers 0, 1, and 2 quite well, along with many other fundamentals. Then spend a few bucks and order ME Labs Trainer ( ). I bought one for my son to learn on, had to make sure everything worked before wrapping it for his birthday, and wound up learning much about how to make these PICs tick. Another thing I found is that once you are a ME Labs customer, Charles will bend over backwards to help you out.

    As a side note, you will see me post often on this forum. I do so as a way of saying Thank You to Charles for always being there when I'm pulling my hair out trying to conquer a new PIC demon; a pay-it-forward type thing.
    We can crack this cotton PIC'n thang!


    • #3


      Guess I left something out of question.

      Program has Port B in it.

      Does the PIC have to have Port B?

      I have been using some PIC's wtih no Port A and B.


      May be a mute question.

      Been using 10F200 and 12F508 family 12F509 and 16F505.

      All PIC's supported by PICBasic probably have Port's.

      Maybe even up to C.
      Last edited by PICBasicUser; 09-29-2017, 07:22 AM.


      • #4
        Actually up to port J on an 18F87k22
        Dave Purola,


        • #5
          Some of the older 12F chips (haven't worked with 10F) use GPIO instead of PORTA, PORTB, etc. You would set your TRISIO instead of TRISB, commands would look like "HIGH GPIO.2" instead of "HIGH PORTB.2". That's the major difference. If you're using a chip that has only PORTA, just wire the hardware to one of the ports and make sure your software does what you want it to.
          We can crack this cotton PIC'n thang!


          • #6

            10F's use GPIO.

            Okay. PICBasic command is TRISIO for GPIO devices.


            • #7
              Put 16F688 in a dev board.

              Will test it programming with PICKit 3.

              Going to check datasheet and see if it has a Port B.


              It's a 16F688. Like a 16F690. I think.

              Dev board has bank of Port A's and Port C's. No Port B's unless I am missing something

              Did test 12F683 on this dev board and it seemed to work okay..
              Last edited by PICBasicUser; 09-30-2017, 04:48 PM.


              • #8
                Congratulations! Progress. The PIC16F688 is a 14 pin device. It uses PORTA.0 >> PORTA.5 (no .6 or .7) and PORTC.0 >> PORTC.5 (again, no .6 or .7). You can blink an LED from any of the I/O pins except for PORTA.3, which is IINPUT only. If you look at Register 4.2 of the Data Sheet, the TRISA Register only offers PORTA.3 as an INPUT.
                We can crack this cotton PIC'n thang!


                • #9

                  Thank you. Next dev board to tset is the 18 pin one.When that is done I will settle down and compile Blink.bas and build LED circuit on one of the boards.

                  I thought I would have to wait for delivery of new order of PIC's to test 18 pin board but 16F54 I have is supported.

                  New order has 3 18 pin PIC's. Just starting to collect PIC's. Getting ones supported by PIC Basic and various books and tutorials.


                  • #10
                    PLEASE abandon your accumulation of out-dated PICs! I made it a habit to look at the copyright date on the data sheets before even considering using a PIC in any project. If it is older than about 2011, I won't use it. I know there are more capable MCUs with more memory and more features for less money. All the PIC part numbers you are mentioning are like 20 years old. Please consider this as you move forward.
                    We can crack this cotton PIC'n thang!


                    • #11

                      I do own 18F PIC's. Have one for CCS C demo. One or two others.

                      PIC Basic Student Edition supports 18F2550. Also supports 18F25K20 and 22.

                      I may have gotten one of the K one's. I will check.


                      • #12
                        Alright, use what you have to learn, but I plead with you to spec more modern PICs when developing "useful" designs. I learned a few lessons the hard way, and this was one of them.
                        We can crack this cotton PIC'n thang!


                        • #13
                          We found the later '75 instructions' PIC's.

                          They are 18F's.

                          I think some of them are K series.

                          We may try an 18F242 and 18F1220.

                          They may not be '75 instruction' ones but they look like simple ones.


                          • #14

                            This version of PIC's on hand is as follows.

                            16F688 Also have 16F690 It's on different datasheet.

                            16F886 Have 16F887 No 40 pin Dev board Could breadboard it.

                            Then for backup have 12F683.

                            16F84 not happening for now. External oscillators and crystals resonators with cap's are whole deal by themselves.

                            Throwing Crystal project in the category with simple hardware USB connection and separate project bootloader when USB works.


                            • #15

                              Cleared off some breadboards.

                              Will put a PIC on one.

                              Compile program.Program PIC in IPE.

                              Build circuit.

                              I've learned it is better to power the circuit.

                              Cuts out the 'Enable Power Target' nuisance in IPE.