Jump to content
Sign in to follow this  

How to start?

Recommended Posts

I program PIC's now in assembler. I program interrupted serial communications between multiple (max 240) PIC's using soft UART on 1 pin (RB0). I use a 5 byte packet for 1 telegram. There is always a master addressing all the slaves in sequence.


Like to learn C programming, like to know if I:


Can do Interrupt driven serial comms (soft UART) with packet receive & transmit on 1 pin (RB0)?


Can use the hardware UART for the same (offcourse using 2 pins)?


Can use var definitions as used in indirect addressing in assembler for packet storage/retrieve?


Finally: where to start with C for PIC?

Like to go for C2C because of the resonable pricing.


Thanks for your help!

Share this post

Link to post
Share on other sites
Guest jemjr

Check the samples on the C2C web site. I am using the Hardward uart for serial communication.  :)

Share this post

Link to post
Share on other sites

Hi, I think you and me are on the ame boat. I always wanted to learn C but needed a project for motivation. Did is what I did to learn enough C for my hobby projects.


1.Buy or go to the library and get the C for dummys book. Is an old book but very good. It will cover the basics. C2C doesn't use all the options like printf and what not, but is sure is darn close.


2. Buy the C for PIC micro from matrix multimedea. Is a cd that teaches you how to program specifically for the PIC micro and it uses the C2C compiler. The cd is not the best but is pretty good. Plus, you can always go back and referesnce the sample codes. It also has all the code easily accesible.


3. visit this forum often and ask questions. Hey I'm a newbie too so any help and ideas is welcome in my book.


4. from my side, buy or build a way to debug cause C2C doesn't have a C level debuger. I'm currently building an universal LCD display controler. The idea is to have this circuit dedicated to a LCD and that I can use it on all or most of my projects. Along this line you should build a PIC tester. I made my own and is very simple. all port A are inputs and all portb are outputs (using a 16f84a device). The outputs are conected to LEDs to see what is going on. This way you can test your code. I'm going to build another one so that any pin can be input or output and any pin can be interface  with the outside world (external device).


I bet you are already seasoned in electronics but just in case let me recomend the following pieces of equipment.


A multimeter. You can get one that measures capacitance and it would be nice for one that measures hfp. Power supply, a breadboard. And finaly a 20MHz or above Oscilloscope. I have a 60MHz and it helped me trouble shoot noise problems created my motors and other little nig nags that can be detected with the naked eye. Go to e-bay and get a tektronix. expect to pay $250 us so, start saving now.

Share this post

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...