Skip navigation
1 2 3 4

Smarter Life

50 Posts authored by: COMPACT Top Member
Neither True Nor False! Some remote controls double up their illumination LEDs as light detectors to reduce the part count and cost so I thought I'd attempt to reduce the part count even further with a PSoC 4. LEDS can double as photodiodes and can be connected to transimpedance amplifiers (TIA) to convert their minuscule current into readable voltages. This is nothing new and I've done this before with an XL Star. The specified item was not found.   The above circuit can be distilled ...
Sensational!   Why have I focussed so much upon standard Timer component? Well it is a extremely useful component and is a great introduction for the PSoC 4 native TCPWM (Timer Counter PWM) mechanism. Above are screenshots of the signal captures of an AMS TCS3200 colour sensor with various light sources. The sensor is a 4 channel light intensity to frequency converter. The channels are Red, Blue, Intensity, Green. The more intense the light, the higher the output frequency thus the sho ...
A Possible Bug In Component Detected!  Why this boring photo? Well read on! This was created using schematic and code.   All very simple but something has gone wrong! Can you spot what's wrong before reading on?   Whilst working on a new test project I noticed misbehaviour that puzzled me. For some reason whilst attempting to display a caption on the Char LCD it only got partially completed and stuck. My previous projects I had no such issue with the Char LCD compone ...
An Old Timer This is a self contained project that demonstrates how to use the Timer component to measure the duration of a button push. It is one of my tests of the Timer (2.5) component. This picture may look simple but there's a bit going on here:      The Timer (2.5) component is configured as a resettable One Shot Timer with trigger and capture      The Timer is triggered upon the depression of the push button      The captu ...
Captured on Film! The Timer (2.5) component also has a capture input. It's options are identical to the timer's trigger options: None Rising Edge Falling Edge Either Edge Software Controlled With the Capture Counter checkbox unchecked, the Capture pin is similar to a Lap time button of a stopwatch but works for a down counter rather than an up counter. The Capture causes the value of the timer to be captured for use for another process. The Capture doesn't cause the timer to stop coun ...
Do you have an itchy trigger finger?  Continuing on the Timer Component theme, this article discusses how to commence the countdown of a timer from an external event. Based on my experience, if you don't use a trigger option you can commence the countdown of a timer using the Timer_Start() API but if you want to defer the timer countdown until a specific event occurs a trigger can be used. The Timer component has several trigger options: None Rising Edge Falling Edge Either Edge ...
You've only got one shot at the title! The Timer (2.5) component offers a two "One Shot" Run Mode configuration options. One Shot One Shot (Halt on Interrupt) This article discusses the standard One Shot option. "One Shot" means that the timer only runs one and then stops. So with exactly the same basic default schematic but with a one shot option selected. The timer can run only once. As usual the timer is started with a Timer_Start() statement. The timer will start and when it reaches ...
It's all in the Timing   Fig 1. The Timer Component in its simplest configuration driving a LED.   It's always handy to know how each mechanism works properly. This article discusses what can be done with the Timer (V2.5) Component. Note:The PSoC 4 with the Pioneer Kit supports the UDB version.   I've worked through this component step by step to develop a decent understanding of it. The first task is to get the timer working in its default and simplest configuration. This ...
4 x 4 (Keypad that is!)  Yep, it's a 4 x 4 keypad. With a PSoC 4 you can make use of a 4 x 4 keypad without the need for creating any polling software. With the inbuilt clocks and UDBs (Universal Digital Blocks) you can create a simple keypad scanner that presents a unique hexadecimal scan code for each key. The scan code is a latched with an accompanying strobe signal to signify a key press to its consumer. The schematic below includes additional NOT (aka inverter) gates to turn on t ...
SPIs Like Us. The PSoC 4 (CY8C41xx and CY8C42xx) comes with a maximum of 4k SRAM. This is not always enough space for larger dynamic video frame buffers so to address this I have connected a SPI SRAM to give me this breathing space. Cypress have planned to release two new PSoC 4 families with with more SRAM next year (CY8C44xx and CY8C46xx). Here is a link to the Roadmap. http://www.cypress.com/?docID=46178   Pictured above are the first test results of sequential access testing. It ...
SPI - DERs! Here is the result of driving two MCP23S17 16-bit GPIO drivers using a PSoC 4. The PSoC4 SPI Master component has a hardware driven SS (Slave Select) signal and it not always appropriate to use it. For these cases the SS needs to be driven under firmware control. One such beast is the Microchip MCP23S17 where the its version of SS called -CS needs to be asserted (held low) for a varying number of bytes according to the circumstance. Since there is a FIFO used for the SPI Master ...
A Metered Response The PSoC 4 has two Current DACs (IDACs) each with slightly different specifications. The component datasheet has all of the relevant information but suffice it to say that up to 612uA can be generated. I put the the 8-bit IDAC to the test really quickly by connecting up an mechanical milliammeter. All you have to do is; Place the IDAC of your choice on a schematic Set up the initial IDAC value in the IDAC component's property box. Connect an Analog Output Pin to the ID ...
PSoC Interruptus PSoC Creator has a novel yet effective way of incorporating ISRs (Interrupt Service Routines) where you can deploy ISR schematic components on the areas where you want an interrupt. This is very quick and much simpler than some other IDEs and compilers that require you to define your own #pragmas and interrupt structures. For instance, if you want a ISR for a rising edge for on a digital input just; Connect the ISR component onto the Digital Input on the Schematic Diagram ...
Do I have double vision? Here are two PSoC 4 Pioneer Kits rigged up for testing. I just thought this looked novel. If you looked carefully you might have noticed that I have installed a connector to each of the Pioneer Kits' Pmod compatible ports. I've mounted right angle connectors allowing the Pmods to be on the same plane as the Pioneer Kit PCBs for convenience. Doing this allows gives me the option to connect Arduino shields unimpeded (should the need ever arise). ...
Local Motion   Gromit and Rocky Rhodes have come to help me demonstrate the PSoC 4 driving two servos simultaneously. I connected two servos to a Pmod CON3 that is subsequently connected to the Pmod compatible port on the Pioneer Kit.   The PSoC comes with two types of PWM Components. A Timer Counter (TCPWM)  version and is standard version. I've used the standard version and set it to 16 bit mode with one output. Doing this consumed 2 UDBs each. To get this up and going ...