Showing posts with label UART. Show all posts
Showing posts with label UART. Show all posts

Monday, September 28, 2009

Infrared improved


This time I improved my infrared project to read the full infrared signal. All of the programming has been done using microchip's C18 compiler.

My new method of approach, as compared to my previous one, is to measure the duration of the pulses being recieved by the sensor instead of sampling at specific times.

In addition, this setup sends the data it received accross UART to the computer.

Here are the program files: main.c myLCD.c my LCD.h









Monday, July 6, 2009

PIC UART on 18f25k20

Due to my current job taking up all my time, I've had no time to work on my personal projects lately. However, I made use of my first 3-day Independence day weekend and figured out how to get serial UART working!

The truth is I couldn't figure out how to work the RS232 to USB stuff. So, I decided to take it slowly and try to figure out how to do UART first!

Here is the code: uart_practise.c

Although this was compiled using the C18 compiler, it can easily be modified to fit HI-TECH's PICC.

You will need some sort of terminal program to see the UART output. Also, if you don't have a serial port on your computer (as most people don't) you need a USB-Serial cable. Once you have everything hardware set up you need to set up the serial port as follows.
  • Baud rate: 9600 bits/s
  • Data bits: 8
  • Parity: None
  • Stop bits: 1
  • Flow Control: None
For more detailed directions and a circuit diagram visit: www.renomania.org/projects/uart.html