Beginners tips for beginners

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
Bobw
Posts: 157
Joined: Sat Jan 22, 2011 10:39 pm
Location: Michigan
Has thanked: 6 times
Been thanked: 27 times
Contact:

Beginners tips for beginners

Post by Bobw »

I just finished my first project using flowcode V4 for PICs. I thought I would list a few things for first timers like myself.
My project was to replace an every day TV antenna rotor control with something with position feed back and greater range of travel.
1) Define you project on paper.
What do you want the project to do. What hardware will you require. Different colors of wires can help keep things neat and more error free.
2) Choose the proper PIC.
Do you have enough I/O pins for your project. Do you require ADC input/outputs on your PIC. Are you controlling servo motors or reading an optical encoder. What type of display if any are you wanting to use. Do you require EEPROM to store information after a power off or for a look up table. Does the PIC require a 3.5 volt or a 5 volt power supply. Does the PIC use an internal or external Oscillator. Does Flowcode and other compilers you may have support your PIC. If this is your first project, get a socket to mount the PIC with.
3) Are you going to make custom PCBs for you project or use perf board like I did.
Custom PCBs may be great if you plan on making several units, but for a one off like mine perf board was easier and cheaper.
4) Write out how you want the program for you PIC to flow.
You can almost do this with flowcode right off the bat because you are simply making a flow chart for your program. For me it started as a list of how far I wanted the travel to be. How to deal with negative numbers. How to store current position. My first go round filled a 3x5 card. The final version filled 4 sheets of notebook paper.
5) ASK FOR HELP
I had never before programed a PIC. I had done many a visual basic program for Microsoft access but had no clue about "C" or Assembly language. The users and Matrix company support here is top notch, the best I have ever run into. But help your self too. Read the documentation, for Flowcode and the PIC you are using, keep them handy at all times. Post what you have written so far. Please respond to suggestions given. If they suggest making a silly LED blink, DO IT. It very quickly can prove out that your PIC is wired correctly and that Flowcode is doing it's job, it helps the person helping you ensure everything is on the right track. Follow upon their suggestions. The problem they solve for you may also solve another users problem. Experiment some on your own.

These are just some basic tips that may help you with a successful start and not a frustrating one. I am already thinking about my next project. Amazing what a tiny microchip can do.

Bob

Post Reply