This is a Tibbit module — part of the Tibbo Project System that allows you to build your own custom embedded device with only the components you need. Start with a Tibbo Project PCB, add Tibbits like this one, then place the built design into a Tibbo Project Box to complete your product.
Tibbit #17: Three PWMs with power outputs (power must be supplied externally).
This Tibbit has a PIC16F1824 microcontroller and takes advantage of the PWM channels available on that PIC device. The PIC micro has four PWM channels, but one of the channels cannot be used because it shares I/O lines with the I2C interface. The I2C interface is utilized for communications with the main CPU of the TPP board and also for PIC firmware upgrades.
The frequency and the pulse width (duty cycle) are set independently for each PWM channel. The frequency is controlled through a divider and a period value. The divider selects the base frequency for the PWM channel. Available choices are 32MHz, 8MHz, 2MHz, and 500KHz. The output signal of the PWM then can be programmed to have the period equal to 4~1024 base frequency periods in 4-period steps (i.e. 4, 8, 12, ..., 1020, 1024). This gives you an output range from 8MHz down to 488Hz. The PWM pulse width can be programmed to have the period equal to 1~1024 base frequency periods in 1-period steps (1, 2, 3, ..., 1023, 1024).
Each PWM channel uses one Singreat Electronics GT430PSB P-channel FET transistor which is rated for 4A continuous current at room temperature.
Combine this Tibbit with #20 (nine terminal blocks) or #19 (DB9M connector). It's not common but possible to use the latter for wiring into the PWM outputs. Tibbit #21 (four terminal blocks) can also be used but you will have to steal the ground elsewhere, as #21 doesn't have its own ground line and the PWM output voltages are with respect to the system ground.
There are two red, one yellow, and one green LED. The first red LED is connected to the SCL line of the I2C interface; the second one to the RST line of the PIC micro. The yellow LED is connected to the SDA line of the I2C interface. The green LED is on the INT line. (Note: The picture above shows a pre-release version of this Tibbit which had a different LED configuration; refer to the diagram below for the actual LED configuration.)
Tibbit #17 ships with the GRA (general register access) firmware, which gives you access to internal PIC registers and memory through the I2C interface. The firmware implements a very simple communications protocol which essentially consists of two important commands: address read and address write. These two commands are used to write to and read from the PIC's internal RAM and registers. This facilitates simple and versatile access to all microcontroller resources. The available Tibbo BASIC library sits on top of the GRA firmware and uses the communications protocol for access and to set the PWM channels.
Since the GRA firmware does not do anything intelligent and all the setup work is essentially scripted in Tibbo BASIC, it is possible to modify PWM setup (and PIC behavior) without making any changes to the PIC firmware.
The GRA firmware can be updated or replaced using the update_pic_firmware Tibbo BASIC project (see below). Thus you can create and run PIC applications that go far beyond providing simple register and memory access.
- Form: M1S
- Power: 5V consumes 20mA
- Mates with: #19, #20, #21 (limited use)
- Similar to: #16, #31
Sample Projects The use of this and other I2C Tibbits is illustrated by a group of Tibbo BASIC test projects. There are two projects related to this Tibbit. The first one is titled test_tibbit_16_17_31_(PIC copro). Run the project in the TEST_PWM_1 or TEST_PWM_2 mode. If this last statement sounds cryptic, please read the release notes published on the test projects page linked above. The second project is update_pic_firmware. Use it to update the firmware running on the PIC micro.
M1S Tibbit Modules Overview M1S Tibbits are single-width modules occupying one standard M socket on a Tibbo Project PCB (i.e. TPP2 or TPP3). Their footprint is roughly 7 × 14 "squares" (one "square" is 2.54 × 2.54 mm). The M1S modules are 12.5mm high.
M1 modules have two rows of 6 pins:
Pins 8-11 are control lines A-D. They provide the interface to programmable modules or other microcontrollers. On Tibbo Project PCBs, these pins are connected to the main processor.
Pins 2-5 are I/O lines facing the outside world. On Tibbo Project PCBs, they go to C Tibbits.
Pins 6 and 12 are the GROUND and +5V power pins. Most Tibbit Modules consume (take) 5V power. There are also power supply Tibbits that generate 5V power from a variety of sources. Those output 5V through pin 12.
Pins 1 and 7 are for the additional +15V and -15V voltages. These are optional and only needed by few Tibbits. A special power supply Tibbit (#12) generates ±15V from the main 5V power.