Look for the OSCCON register in the data sheet (as of this edit, page 19). This register, among other things, controls the speed of the internal clock. Upon startup, the processor runs at 31 kHz (way too slow. ) Using OSCCON, we can increase the speed to 8MHz. on reset all your pins are set to input (TRISB is set to high). So set TRISB low to do ou
Click here to download the full size of the above Circuit.
tput on a pin. *Can you add a breif description of what TRISB means Like you did for OSCCON above * Put the chip in the ZIF socket. Also make sure the hockey puck has the external 9V supply attached to it, otherwise the following steps will give you an error message about invalid device ID, and Vdd will be 0V instead of 5V. *Where is the 9V supply attached to * Then, on toolbar that appears: "Reset and connect to ICD" button *Where does this toolbar appear And what do you do with it Are we supposed to go into the MPLAB ICD 2 Setup Wizard * The internal PIC clock runs at whatever speed we set it to (via OSCCON register)-this frequency is denoted Fosc. The timers will tick one tick per instruction cycle. In the P18F1320 one instruction is executed every 4 clock ticks, so if our oscillator is at 8MHz (Fosc = 8MHz) then instructions will be executed at 2MHz. So, the timers will increment at 2MHz. If the timer is set up as 8-bit, the number you count up to can only go up to 256. If it is set up as 16-bit, you can count up to 65, 536. The subtraction will always work out correctly (even if the timer wraps around, which it will) if you cast the subtraction as an unsigned char (for 8-bit) or unsigned int (for 16-bit). This circuit turns on the LED when a magnet is held close to the Hall effect sensor, with either end (North or South) towards the hall effect sensor. The PIC reads in the analog voltage from the Hall effect sensor...
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....
characters left: