PIC18: Connecting to a PS/2 mouse

ps2 pic In a previous article we saw how to connect to a PS/2 keyboard. Here we are completing topic by describing how a PS/2 mouse can be interfaced to a PIC micro.

PIC18: Connecting to a PS/2 keyboard

ps2 pic With the advent of the USB protocol in the 90's many peripherals' manufacturers abandoned the previous protocols and connections to adopt it as a unifying standard; in the past printers mostly used parallel/Centronics ports, modems were serials, scanners could use SCSI interfaces, which often required a daughter board to be placed inside the cabinet of PC's, and mice and keyboards had to be connected to PS/2 ports.

PIC18: 8x8 LED Matrix display and shift registers

In this experiment we will use PIC 18F4550 little bro, the 18F2550; it has (mostly) the same features as its oldest sibling but with a reduced number of IO's, making it suitable when there is no need of many ports.

PIC18: Ultrasonic sensor

hc-sr04 In this article we are going to experiment with an ultrasonic sensor, the HC-SR04; it seems quite known and common, especially in the Arduino community, maybe because it is quite cheap and simple to operate.

Wanna discover how we can use it to measure the distance of an object, by interfacing it to the Freedom II development board? Yes? Coool! So... let's get started!

PIC18: 7-segment displays

7seg-3d 7-segment displays are an effective and still widely used way of displaying alphanumeric data.

In fact they are quite simple, because they consist of 8 leds (decimal point included) connected in parallel and with the cathode (or anode) in common; by turning on specific leds ('segments') a number or letter is displayed.

Here we see the two types of displays:

PIC18: PCF8563 I2C Real Time Clock Calendar

rtcc clock calendarThe Freedom II demoboard includes also a PCF8563 I2C Real Time Clock Calendar (RTCC); let's learn how to use it to display time and date and set an alarm.

PIC18: I2C EEPROM dump via RS-232 serial

In this project we are going to implement two different buses to get data from and to a PIC18: serial RS-232 and I2C bus. For an intro to I2C please see Wikipedia; the scenario that was implemented below is the one in which the PIC operates in master mode.

PIC18: branch instructions

binary codeSkimming through the PIC 18F4550 istruction set we can see, among others, a bunch of branch instructions.

What are they for and what's their relationship with the STATUS register? Let's see them in practice using some assembly code examples. This will also be a nice occasion to do a bit of simple HEX math.

Branch instructions

BC - Branch if Carry

BN - Branch if Negative

PIC18: a guide to assembling, linking and programming with Linux

microchip pic linux tuxHave you ever wondered how to program Microchip PICs in assembly under Linux? Here's a quite in-depth introduction that tries also to show the inner workings of the PIC18 family architecture.

We'll start to see how modular assembly is using relocatable code and how cool it is working at this low level, so low that we can understand how PICs think and work!

Subscribe to www.t3ch.it RSS