Hi, I'm John Main, 

If you need a Great Start in microcontroller C programming then this is the:

'Ideal Course For You"

It teaches you 

C programming by executing Fully Debugged code on  

'real hardware'.  

Why this course?

This course:
  • Teaches fundamentals of *practical* C programming.
  • Starts from the very beginning - no coding experience needed.
  • Starts you using hardware in the very first course module.
  • You will learn the theory and then *see* the code in action.
You will understand how and why the C code works.

All this adds up to the fact that You Will:

    Learn C Easily.
    Learn by Doing.
   Learn With Active hardware.
   Learn As Fast As You Want
(All modules instantly available).

Each module has been tested and Fully Debugged
on my own hardware 
so it is
Guaranteed To Work.

Each module is supplied as a digital download and you gather together the reqiured hardware. When you follow the schematics and burn the supplied hex file into the PIC, the circuit will work as it is supposed to (tested by many, many people who have already taken this course and by me as well).

At this point, you are working from a Solid Foundation of working code.

"A tutorial/course that really works"

"Well, it took a long time and hundreds of searches to find a tutorial/course that really works. I find this course to be by far, the best. Anyone can learn to program the PIC microcontroller quickly."

Rating 1 Excellent
Greg E. ( lexicon <at> clearwire.net )

Learn how you can Create a Full project

The final project (a curve tracer) shows you how to create a full C project including:

  • Digital I/O.

  • RS232 input and output.

  • Digital to Analogue conversion (DAC) using PWM technique.

  • Analogue to Digital conversion (ADC) using internal 10bit ADC.

The project shows you the process of creating a project and you will understand exactly how to create itand how it is designed.

"Good for a beginner"

"I really like the tutorial
good for a beginner."

Rating 2 Very Good
Sudam sudamkakre ( <at> rediffmain.com )

Why use C in your projects?

Once you have learned C 

you can use it in all your projects 

and it's much easier than assembler.  

Using C:

  • is a more efficient use of your time.
  • allows you to focus on the problem not the language used.
  • Gives you a new skill that you can use in industry.

Here's why C is a better choice:

Would you rather read this? Open assembler code [opens new window] Assembler code example
Or this ?

   i = 0;
   while(i<10) {
      PORTB = i;
      i = i +1;

C source code example

Note: The above C source code generated the assembler output shown - they are exactly equivalent!

I know which I prefer:

The assembler is impossible to read and about 30 lines! 


...the C source code is easy to read and only 5 lines!

When you use C:

  • It is easier to read than assembler.
  • You use less coding than assembler.
  • It lets you create projects more quickly (less code writing).
  • It is structured (you will easily see the operation of the code).

You can re-use code from other projects (or the web), so don't start from scratch each time and its already Completely Tested.

"Awesome tutorial! Thanks Mr.John !!!"

"Anyone with a Zero
Knowledge of C
Can Learn the Modules
from this Site!"

Rating: 1 Excellent
R.Prem Sunder ( prem.eie <at> gmail.com )

"Clear and concise writing style"

Thank you for the clear and concise
writing style. It is very easy to
follow and a good place to start."

Tim ( timandjan <at> rogers.com )

Module Details


Main concept: C program structure

This module examines the structure of a C program and shows you how to control the input and output ports of the microcontroller.

The first program is a simple one (flashing an LED) - it's deliberately kept simple so that it is easy to get going.  

Because it is simple it lets you concentrate on the interfaces needed to get it going.
C program structure.


Main concept: individual bit control

This module shows you one of the most important control methods i.e. how to control individual bits in a port.

This is demonstrated on the hardware by flashing the LED using individual bit control.

It also demonstrates using ports as inputs or outputs.  PORTA is used as an input port and PORTB is used as an output port.  Since LEDs are connected to PORTB and input buttons are connected to pins of PORTA you can immediately see the program operating.

Note: Port directions are controlled using registers TRISA and TRISB.
Controlling individual port bits.


Main concepts: variables and conditionals

This module discusses variables and how to choose them with reference to memory usage.

In addition it introduces conditionals which let you use the microcontroller to make decisions.

To demonstrate the conditionals an if-else construct and a variable are used to flash the LED.  This demonstrates using C to do the same task as the previous module but using a different method.

The second program uses the switch statementto change the update rate depending on the number of keys pressed i.e. it changes how fast the led flashes depending on which keys are pressed.

It shows use of the C  switch and if structures demonstrating their use on the hardware.
Variables types and Conditional statements.


Main concept: while loops and arrays

This module examines the 'while' loop which is used to develop the basic keypress detection Key debouncing is also done inside the keypress loop.

This module also discusses arrays which are then used to map a random number to the correct LED sequence for displaying the dice digits.  

The module shows how to map the internal representation to the PORTB LEDS.

These concepts are shown for real by running the code on the hardware.

The module also discusses the do-while loop and the break statement to exit from a loop.
Dice project using arrays and while loops.


Main concepts: functions, for loops, increment and decrement

This module introduces the concept of functions that let you split up complex programs into more manageable parts.

It also introduces the simple increment (add one) and decrement (subtract one) operators.

It then looks at 'for loops' which are used to simulate rolling the dice and demonstrates these concepts on the hardware.
Tidying up the dice project: Functions.


Main concept: RS232 port and strings

This module shows you how to set up an RS232 connection to communicate between the PIC and the PC.

First of all it covers methods of using string data and how you can format that data i.e. to convert a variable into its string representation (essential for outputting data from your PIC to the PC).

The first program uses the string formatting information to create  the "Hello World" program and output a number to the PC terminal showing how to send data to the PC.

The second program shows you how you can loopback the RS232 port so that anything typed at the PC terminal is sent from PC to PIC to PC.
Talking to the PC: RS232.


Main concept: local statics and scope

This module shows you how to create a local function variable that is not lost when the function is finished (local static variables).

It also describes the rules of visibility of variables or scope.

To demonstrate local static operation the value of a local static is increased every keypress and it's value output to the serial port.

Also included in this module is information on compact operators (a short hand way of writing C mathematical operations).
Local statics
and compact operators.


Main concept: State Machines

This module shows you how to make up your own types using enumerations (numbers!).

These are then used to create a state machine which is described in detail.

After this the dice project is converted to use a state machine so you can see exactly how a state machine works.

You then program the dice hardware to see the state machine operation.

State machines are useful as they let you create complex operations by first describing the operations visually (state machine diagram).

The visual state machine diagram is much easier than C code to read so you will be able to see how the code is going to work.  In addition the visual state machine is a useful way of documenting how the code is working.
Enumerated Types, typedef and Preprocessing.


Main concept : passing multiple arguments

This module discusses how to transfer more than one variable into or out of a function using pointers.

It goes over what a pointer is and what it can be used for and then goes on to compare two functions one using normal arguments and one using pointer arguments (passed by reference).

As well as outputting the result of these functions to the RS232 port - to show real operation the module also reads two ADC input pins (using pointer functions) and outputs theses values to the RS232 port.

In addition a simple technique of using VT100 commands to Hyperterminal is used to stop the screen scrolling continuously as data is displayed.
Pointers and pass by reference.


Main concept :  structures and PWM

This module shows you how to use struct types to store more than one variable in a group object.  

The reason for this is that it lets you group variables that are related to each other or which have a common purpose into a single entity.  You can then easily refer to each variable in the group.

It also shows how to use bit fields in a structure definition to save RAM space.

Again the RS232 port is used to show real variable output data at the hardware in this case from the bit field and from the structure variable.

The first part of the curve tracer is constructed using two opamps and the output is read back by the ADC and displayed at the RS232 interface.

Detailed information is given on using and understanding the PWM internal peripheral.
Structures & PWM.


Main concept : Multiple file structure

This module shows you how to split a project into sub-blocks using multiple files.  It discusses header files necessary to make this work.

As part of the header file discussion the module also introduces prototypes which are necessary for header file operation.

In addition casting is presented (or how to make the compiler do what you want it to do!).

The rest of the circuit for the curve tracer is presented and the PC software to show the graph is available for download.
Multiple project file structure.

Frequently Asked Questions

Q1: What are the system requirements?

Ans: You can take this course using any Windows based PC system (to run the programming software and compiler).  The MikroC compiler from micrkelectronica is used in its free mode (outpout to 2kHex) bytes which is plently to demonstrate all C operations.

Q2: What happens if I have a question or want to make a comment on the course?

Ans: Each course module page has a feedback form where you can post comments.

Q3: What if I don't have any hardware ready?

Ans: You can use the simulator built into the compiler  - with this you can easily step through the code and see the code operation and variable's state.

Q4: How is the course delivered?

Ans: You will receive an email delivering you a secure link to the course access page.

Q6: What is the duration of the course?

You can take it as fast or slow as you like.  You will have access to all the module pages, videos and refence manual immediately after purchase.

Q7: What software is needed?

Ans: You only need the programming software and compiler. You also need to install the adobe pdf reader (link provided in a module). You also need Shockwave Flash installed into your browser. MikroC from mikroelectronica is used in its free mode (2k Hex bytes) - you do not need to buy it.  Programming software comes with a PIC programmer such as the pickit2.

Q8: Do I need High speed Internet access to do this course online?

Ans: The course pages are the same as any other Internet page so you can use dial up if you need to.  Note while it is easy to use the internet if you don't have access all the time you can download the pages using the built in browser menu operation "File Save As" to save the module pages to your hard disk.


What are the other course features ?

  • Microcontroller
The course uses a modern microcontroller the 16F88 which has six internal peripherals including a USART, ADC and a PWM generator.  

The 16F88 a very good choice for all kinds of projects.

This course is a great introduction to this powerful processor.

  • Videos

Two Videos show you how to setup and use the programmer and compiler.

With these videos you will learn the applications before you use them for 'real'.

  • Source code view
A separate source code window shows the code while you read the course notes.

"A Very good tutorial"

A very good tutorial for starting in
MicroC and PIC microcontrollers !

Rating: 1 Excellent
Maksim (msurguy <at> gmail.com )

  • Incremental circuits
Each project i s built up incrementally so you can easily make the project work as there is code to test out each circuit at each stage.
  • Downloadable Hex and source code
Hex file included: "Ready Immediately"  
Program the 16F88 immediatlely

Source and project files: "Ready Immediately"
 Edit and change the project for your own use.

PIC Microcontroller C reference book
  • C Reference Manual

The free bonus C reference manual contains practical advice (that you won't find anywhere else) for using the PIC microcontroller as well as C syntax examples.

"A very well written C course"

Thank you for a very well written C course. I have read the course material and a lot of what I have been trying to learn is making sense after seeing the way it is used in real life.

Rating: 1 Excellent
William Thorsen ( billthorsen <at> sbcglobal.net )

What is this course worth ?

PIC Microcontroller Reference manual (included)
Full C programming course (included) $99.95

C Course Number of pages :  114 Pages 
Reference manual number of pages :   64 Pages
Total pages :  178 Pages

Video Tutorial 1 (included) $14.95
Video Tutorial 1 (included) $14.95
Fully debugged schematics (included) $29.95
Total $184.75


I have decided to lower the price even further as a special offer.

Note: This may not last that long since this is an experiment.


Now total reduction from $67 is

25% Off

PIC Microcontroller C programming course: ONLY $49.99

That's a Massive Saving For You...

Why am I selling it at this price?

There are several reasons.  

Number one: This is a Fully Digital Product .

There's no postage, shipping or components included in the price - this significantly reduces the cost to you.

Number two: This Course Works.

I know this course works and I want as many people as possible to benefit.

Number three: This is a Low Price Offer.

The price could go up at any time so order the Course within the next 24 hours to ensure you can still get it at the above price.


30 Day Trial 


Order your C Course now and try it for 30 days. If you decide that you haven't
learned anything from this course after 30 days...

I'll Return Your Money.


 I'm so certain you'll benefit from using C course, that I give a 100% guarantee.


It can not stay at this Crashed price for long so...

Note:Image is for illustration only you do not receive a physical book
You receive a digital download link for all the elements in the course.

CLICK The Add to Cart Button Now...

To get your PIC C Course...for  ( $184)   ($97)  

Only $ 49.99...

This price may go back up at any time.  
To lock it in you must purchase
NOW (before I change my mind).

Don't forget to get your bargain "State Machine Secrets"
below (before checking out at PayPal
come back to this
page and click
the second add to cart button below).

Note: There's no waiting around for this course you can start it as soon as you pay.

As soon as you purchase you will automatically receive a download link which is sent to your paypal email address. This system is fully automated so you can buy even if it's 3am!

In most cases this is instantaneous but if you do not get this email within 10 minutes ...just Contact me via the website "contact me" button.

There is no need to wait days to do this
so please contact me if you have any problems
and I will resolve them Guaranteed.

Extra: I have just completed a new ebook which will help you write complex code.

It is "State Machine Secrets".  

This Ebook will allow you to create complex code by using state machines - I show you the exact method I use to make complex code

Although the C Course does touch on this topic the ebook goes into great detail showing you two projects (fully debugged on hardware) that will really make your complex projects a snap.

Note: I got stuck at one point on how to detect a double click on a keypad and used my own techniques in the ebook to sort it out! - sometimes you can get stuck writing code and its useful to have a Proven Process to follow.

Just Click 'Add To Cart' to buy it now: Only $8.97

Note: You can get your download immediately (you don't need to open a PayPal account) - PayPal can be used with just a credit card.

There's an option to just use the CC without needing to set up your own PayPal account.

PIC Microcontroller C reference book

"The PIC Microcontroller
C Reference Manual"

"I am PayPal verified which means your purchase is secure"

(You can see the verification details 
when you order at PayPal)

CLICK The 'Add to Cart' Button...

(Scroll back there Now)

P.S. Many people are finding the course Extremely Useful and
are learning C easily...

P.P.S. Stop using assembler

and Stop wasting time - Learn C now and...

      ...find out how easy it is to create projects in 1/10th the time.

P.P.P.S. Order within the next 24 Hours before...

...this Amazing Course goes up from the introductory price;

 "Remember - It's guaranteed "Risk FREE".

Click Here Now