westaust55
Moderator
The WorldSemi WS2801 chip has been around for some time and is relatively simple to connect to the PICAXE range of chips including the older 18X, together with the X1, X2 and M2 parts.
These 3-channel constant current LED drivers are great for controlling strings of RGB LEDs. The WS2801 is controlled by a 2-wire serial control scheme (SPI like) that allows multiple WS2801 chips to be daisy chained together.
Use a handful of these chips in conjunction with some RGB LEDs can create a colour displays, or with regular LEDs for a monochrome display a display that is three times the size. It would even be possible to just the WS2801 as a source of some simple PWM outputs to free up PWM pins on your PICAXE by controlling multiple LEDs with only two pins.
WS2801 features include:
The Attached tutorial provides some details about the WS2801 that might not be immediately clear to newcomers including:
PICAXE BASIC program files are included in the following 2 posts
For the M2 parts, the serial data transfer routine is based upon that previously posted by hippy
This makes for a compact looping routine for the M2 parts which do not have the SHIFTOUT commands available in the X1 and X2 parts.
The looping structure does however require the PICAXE to be run at a higher clock speed (16 MHz) to meeting the WS2801 timing requirements.
By comparison, with the SHIFTOUT command and a short string of WS2801 chips, the X1 and X2 parts can be operated at 4 MHz clock speed and still meet the WS2801 timing requirements,
Hopefully others will find this information useful to avoid problems and get a WS2801 based RGB LED string up and running quickly.
These 3-channel constant current LED drivers are great for controlling strings of RGB LEDs. The WS2801 is controlled by a 2-wire serial control scheme (SPI like) that allows multiple WS2801 chips to be daisy chained together.
Use a handful of these chips in conjunction with some RGB LEDs can create a colour displays, or with regular LEDs for a monochrome display a display that is three times the size. It would even be possible to just the WS2801 as a source of some simple PWM outputs to free up PWM pins on your PICAXE by controlling multiple LEDs with only two pins.
WS2801 features include:
- 3.3 V to 5.5 V Power supply
- 2-wire control scheme reduces no of PICAXE IO required
- Built-in PWM dimming scheme for each channel with free running PWM
- Supports both constant current drive mode (most frequently used scheme) and constant voltage drive mode
- Wide constant current range from 5-150mA (total of 3 channels) - NOTE: As a constant current driver, each channel is limited to 30 mA.
The Attached tutorial provides some details about the WS2801 that might not be immediately clear to newcomers including:
- how the data is clocked through when there are multiple WS2801 daisy chained together
- calculating the resistor valve for current limiting
- typical schematic for connection of several WS2801 chips to a PICAXE
- program examples for X1, X2, M2 and 18X PICAXE parts.
PICAXE BASIC program files are included in the following 2 posts
For the M2 parts, the serial data transfer routine is based upon that previously posted by hippy
This makes for a compact looping routine for the M2 parts which do not have the SHIFTOUT commands available in the X1 and X2 parts.
The looping structure does however require the PICAXE to be run at a higher clock speed (16 MHz) to meeting the WS2801 timing requirements.
By comparison, with the SHIFTOUT command and a short string of WS2801 chips, the X1 and X2 parts can be operated at 4 MHz clock speed and still meet the WS2801 timing requirements,
Hopefully others will find this information useful to avoid problems and get a WS2801 based RGB LED string up and running quickly.
Attachments
-
866.1 KB Views: 519