Tips & tricks

Using EEPROM to store data after power down

The data memory of the PIC18F4550 is volatile. This means that information stored in this memory is lost when the power is switched off. In many cases this is not a problem, but sometimes it's useful that certain data, e.g. configuration data, is saved even when the board is powered down. To this end, the PIC18F4550 contains 256 bytes of non-volatile EEPROM memory besides the volatile data memory. This memory can be used to store non-volatile information.

5

Using variables larger than 256 bytes

Several applications require the use of variables larger than 256 bytes. For example, if you want to build a robot with a camera and process images, or add cool effects to an audio stream. But while the PIC18F4550 of the Dwengo Board contains 2048 bytes of data memory, the default linker script does not allow one to create variables larger than 256. This is fairly easy to fix though.

0

A proximity sensor insensitive to ambient light

Proximity sensors such as those described here work by emitting infrared (IR) light and measuring the amount of light that is reflected by an object in close proximity to the sensor. However, when other sources of IR light are in view (such as the sun), the sensor cannot know whether the light it is receiving actually comes from the IR LED in the sensor and has been reflected by an object, or whether it is just ambient light. This can cause the sensor to falsely believe that an object is closeby, while in fact it just saw ambient light coming from the sun, an (incandescent) light bulb, or some other IR-light source (TL or fluoresent light bulbs usually don't emit enough IR light to pose this problem).

4.5
Syndicate content