Waveform Generator
AHT21, MAX6675 Thermometer
USB Input Output
CH376 USB Picture Frame
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
Picture Frame PIC16F690
Color OLED Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
Arduino Picture Frame
AD9833 Waveform Generator
Chrome Browser Counter
Arduino LED MAX7219 Counter
LCD Accurate Counter
OLED Accurate Counter
MilliHertz Counter
PIC Counter For Android
MAX7219 LED Counter
WiFi Frequency Counter
Frequency Generator
OLED Counter PIC12F629
Talking Frequency Counter
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
OLED Frequency Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
OBD2 RPM meter PIC16F876A
OBD2 Engine Rev Counter
OBD2 Diagnostic app
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
Serial Thermostat
USB DS18B20 Sensor
Cuckoo Clock
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
Clock Thermometer
Talking Clock PIC16F628A
Android Talking Clock
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
IO for Chrome Browser
USB 16x2 LCD
USB TFT display BMP
USB Meter
USB Input-Output
USB Input-Output Android
Analogue to USB (CH341)
MCP3201 on Serial Port
PC Analog Input (USB-UART)
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to Serial
HC-SR04 Sensor
OLED Amp Meter
PC digital I/O (no coding)
Analogue Signal to LPT
LCD Display on LPT
Water Softener
3.7V to 5V
Solar Charger
PIC Music
Code Lock
  Technical Tips  


Compiling and Programming
The PIC12 and PIC16 projects are compiled with HI-TECH C compiler or XC8. PIC18 projects are compiled with MICROCHIP C18 compiler ver. 3.30 or 3.43 or XC8. MPLAB8.x or MPLAB X are used.

Sourcing components: some components can be bought directly from China because the price is more sensible. I use eBay for most of the components. Avoid buying from when you order small quantity they label you as not valuable customer and send you rubbish out of their bin.

I use breadboard to develop the circuits on, and find it easy to use stripboard to build the projects on.

Where it is possible I choose components that are widely available, where the value and type isn't very critical to the operation of the circuit. In digital circuits values aren't critical because most resistors are used for pull up or current limit.

Resistors are 0.5 - 0.25 watt, carbon film, 5% tolerance. Metal film resistors can be used too.

Polarized capacitors are electrolytic, 10V or higher. Capacitors of values between 1uF to 1nF are either plastic film or ceramic. Values in pF (used for the oscillator) are ceramic. The voltage can be 10V upwards.

Transistors are plastic package, TO92 or similar, unless otherwise stated in the project.

Sourcing components vary greatly between countries so it's hard to give good tips, Ebay can be a good source,
you may also find on the right hand side some websites for local components suppliers.

If you recycle components from old projects or old appliances you might be helping the environment and your pocket too.

Analogue voltage input
To increase the input voltage range use a voltage divider.

R2 can be up to 10K.
R1 = (Vin - 5) * R2 / 5

R2 = Vin =

Use metal film resistors for better temperature stability. If Vin is a multiplications of 5 you can use R1 made of serially connected resistors with the same value of R2, and in this case you can use 5% carbon film resistors.
Example: for Vin = 20V, R2 = 10K and R1 = 3 resistors of 10K in series.
The measured voltage is as accurate as the 5V supply because the Vref is connected to the Vcc. If your supply voltage isn't 5V you can compensate for the error in the VB application.
1N4148 diodes (or equivalents) and 1K resistor protect the input of the IC, they are recommended option.

Three common ways of pic output drive:
driving relay,
driving power mosfet to switch high DC current,
driving opto-isolated triac to switch AC.

iconFlag  2008-2024