Maker Pro
Maker Pro

PIC C programming help

P

Prakash

Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros. In college I was a horrible
programmer, some 16 yrs ago where I took PASCAL and Fortran. Since
then I have to rely on others to do my programming. All I can do
currently is make small changes to existing code.

I am looking for a tutor in the Wash DC area, that I can PAY in cash,
for lessons on C programming specificly using the CCS compiler. I am
assuming about 10 sessions, about 2 hrs each should get me going.

Mainly most of everything I need to know is setting up ports, bit
banging I2C and SPI messages, reading in switches, may be some A to D
conversions, and getting an LCD display to work with a PIC. I live in
Gaithersburg Maryland, and is willing to travel up to 20 miles for
lessons in the evenings and weekends.

I need an overview of C, I have read all that I can about C, so I a
ready. But there are too many questions, that I could easily get
answered by a tutor. This will cut short my learning curve.
 
I

Ignoramus13308

You can also try the following C program:

char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
 
E

EE123

Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros. In college I was a horrible
programmer, some 16 yrs ago where I took PASCAL and Fortran. Since
then I have to rely on others to do my programming. All I can do
currently is make small changes to existing code.

I am looking for a tutor in the Wash DC area, that I can PAY in cash,
for lessons on C programming specificly using the CCS compiler. I am
assuming about 10 sessions, about 2 hrs each should get me going.

Mainly most of everything I need to know is setting up ports, bit
banging I2C and SPI messages, reading in switches, may be some A to D
conversions, and getting an LCD display to work with a PIC. I live in
Gaithersburg Maryland, and is willing to travel up to 20 miles for
lessons in the evenings and weekends.

I need an overview of C, I have read all that I can about C, so I a
ready. But there are too many questions, that I could easily get
answered by a tutor. This will cut short my learning curve.


Since you are willing to pay, why
don't you take a college course?

Dave
 
P

Prakash

There are no courses that are embedded C specific that I can find. If
I don't find a tutor, thats an option I will consider.
 
D

Don Foreman

You can also try the following C program:

char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}

How is this helpful?
 
D

Don Foreman

Since you are willing to pay, why
don't you take a college course?

Dave

A college course in C will teach the language assuming apps on PC's or
larger computers. It will include and focus on features of C that
would rarely if ever be used in most uC embedded control apps. The
disparity of memory extent and processor speeds between a PC and PIC
or AVR uC's is enormous, orders of magnitude.

The sticky part is learning to use C in the context of a limited
environment of a uC, and learning to use a C compiler (like CCS)
that is specifically aimed at uC's Learning C is almost trivial
compared to dealing with the myriad of datasheet details that one must
get right to get a uC to do what is desired and expected. That's
where tutoring could be very useful.

I'm in the same process myself -- but I can't justify the cost of
training because I'm retired and doing this for pro bono projects. So
I'm slugging it out, makin' some progress. It's a very good thing
I'm not on a schedule and nobody's paying for the time I'm spending.
 
R

Roger Hamlett

Don Foreman said:
A college course in C will teach the language assuming apps on PC's or
larger computers. It will include and focus on features of C that
would rarely if ever be used in most uC embedded control apps. The
disparity of memory extent and processor speeds between a PC and PIC
or AVR uC's is enormous, orders of magnitude.

The sticky part is learning to use C in the context of a limited
environment of a uC, and learning to use a C compiler (like CCS)
that is specifically aimed at uC's Learning C is almost trivial
compared to dealing with the myriad of datasheet details that one must
get right to get a uC to do what is desired and expected. That's
where tutoring could be very useful.

I'm in the same process myself -- but I can't justify the cost of
training because I'm retired and doing this for pro bono projects. So
I'm slugging it out, makin' some progress. It's a very good thing
I'm not on a schedule and nobody's paying for the time I'm spending.
I'd say though, that the 'best' route,would be to learn normal C, and PIC
assembler. You need to understand the processor limitations at the
assembler level, to best understand and deal with the limitations of the
embedded C.

Best Wishes
 
M

martin.shoebridge

I'd agree. without knowing the PIC intimately, how are you going to write C
routines that handle I/O. Might as well do it all in assembler... Better
still, switch to 8051 or Atmel AVR. :)
 
R

Richard Seriani, Sr.

Prakash said:
Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros. In college I was a horrible
programmer, some 16 yrs ago where I took PASCAL and Fortran. Since
then I have to rely on others to do my programming. All I can do
currently is make small changes to existing code.

I am looking for a tutor in the Wash DC area, that I can PAY in cash,
for lessons on C programming specificly using the CCS compiler. I am
assuming about 10 sessions, about 2 hrs each should get me going.

Mainly most of everything I need to know is setting up ports, bit
banging I2C and SPI messages, reading in switches, may be some A to D
conversions, and getting an LCD display to work with a PIC. I live in
Gaithersburg Maryland, and is willing to travel up to 20 miles for
lessons in the evenings and weekends.

I need an overview of C, I have read all that I can about C, so I a
ready. But there are too many questions, that I could easily get
answered by a tutor. This will cut short my learning curve.
Have you tried posting to the foums at http://www.microchip.com?
Microchip also has a lot of information about programming PICs in C.
Finally, Old Dominiion University (Norfolk, VA) offers at least one
microprocessor design course which uses C (EET470). Others may, as well.

Good luck.

Richard
 
D

Don Foreman

I'd say though, that the 'best' route,would be to learn normal C, and PIC
assembler. You need to understand the processor limitations at the
assembler level, to best understand and deal with the limitations of the
embedded C.

Best Wishes

Yup. That's what I'm doing now -- working at the assembler level.
C is easier to structure, but one really must understand the uC to
configure the I/O, timers, A/D, memory banking, etc etc.
 
E

EE123

Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros. In college I was a horrible
programmer, some 16 yrs ago where I took PASCAL and Fortran. Since
then I have to rely on others to do my programming. All I can do
currently is make small changes to existing code.

I am looking for a tutor in the Wash DC area, that I can PAY in cash,
for lessons on C programming specificly using the CCS compiler. I am
assuming about 10 sessions, about 2 hrs each should get me going.

Mainly most of everything I need to know is setting up ports, bit
banging I2C and SPI messages, reading in switches, may be some A to D
conversions, and getting an LCD display to work with a PIC. I live in
Gaithersburg Maryland, and is willing to travel up to 20 miles for
lessons in the evenings and weekends.

I need an overview of C, I have read all that I can about C, so I a
ready. But there are too many questions, that I could easily get
answered by a tutor. This will cut short my learning curve.



Give me a call tomorrow
at 301 262 8837

Dave
 
I

Ian Bell

Prakash said:
Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros.

No you are not. RF designers are rare. PIC programmers are two a penny.

Ian
 
D

David Brown

Prakash said:
Hi - I am at a major disadvantage in my career as an RF designer, not
knowing how to program PIC micros. In college I was a horrible
programmer, some 16 yrs ago where I took PASCAL and Fortran. Since
then I have to rely on others to do my programming. All I can do
currently is make small changes to existing code.

I am looking for a tutor in the Wash DC area, that I can PAY in cash,
for lessons on C programming specificly using the CCS compiler. I am
assuming about 10 sessions, about 2 hrs each should get me going.

Mainly most of everything I need to know is setting up ports, bit
banging I2C and SPI messages, reading in switches, may be some A to D
conversions, and getting an LCD display to work with a PIC. I live in
Gaithersburg Maryland, and is willing to travel up to 20 miles for
lessons in the evenings and weekends.

I need an overview of C, I have read all that I can about C, so I a
ready. But there are too many questions, that I could easily get
answered by a tutor. This will cut short my learning curve.

The first and most important step to learning embedded C programming is
to take your PIC board, tie it to a stone, and throw it as far as you
possibly can into a lake. It doesn't matter if you have bought tools or
cards already - the money is wasted.

Get yourself an AVR or an MSP430 evaluation board along with the
ImageCraft compiler. There is no point it trying to learn embedded
programming with the most convoluted and crippled architecture known to man.

As others have said, you need to learn assembly on the device - at least
to the level of understanding it - so that you understand what is
happening. As you are coming to embedded programming from an
electronics background rather than a PC programming background, I expect
that will appeal to you.
 
Top