SparkFun Forums 

Where electronics enthusiasts find answers.

Have a good idea for a new product for SFE or Olimex? Let us know!
By SOI Sentinel
I'm starting a new thread, otherwise I'll drag "Gyro Sensors" way off tangent...

Have you looked into the Cypress Micro PSoC chips as a possible new line of microcontrollers? I know that you have you carry the uC-FPU based on one of the chips, however, I've been looking into it for a few uses, including boosting and filtering analog data from accelerometers and gyros without need for external components.

One thing that your uC FPU doc doesn't actually mention is that they may be interally clocked to 24MHz, but they run 6 cycles per instruction max. Their real strength is the reconfigurable digital and analog blocks (which the analog at least probably isn't used in the FPU I'm guessing).

Using a Cypress as an I2C or SPI or younameit master "sensor head" connected to a fair number of unconditioned analog sensors makes for a fairly powerful system, especially since it can do most if not all required transforms onboard to compensate for tilt or other strange alignments, such as the Gyro Sensors being discussed in a different thread.
By SOI_Sentinel
Ok, got my head on straight... time to fill in this info a bit....

I've done some work (for a contest) with the highest end available PSoC from Cypress, the CY8C27643, which they have in consumer and automotive grades now. FYI: 3 of these were used as the flight control system on SpaceShip One. ... c27443.pdf

Copying from their short form (ok, lazy, and too much info):
Code: Select all

    * Powerful Harvard Architecture Processor
          o M8C Processor Speeds to 24 MHz
          o 8x8 Multiply, 32-Bit Accumulate
          o Low Power at High Speed
          o 3.0 to 5.25 V Operating Voltage
          o Operating Voltages Down to 1.0V Using On-Chip Switch Mode Pump (SMP)
          o Industrial Temperature Range: -40°C to +85°C
    * Advanced Peripherals (PSoC Blocks)
          o 12 Rail-to-Rail Analog PSoC Blocks Provide:
                + Up to 14-Bit ADCs
                + Up to 9-Bit DACs
                + Programmable Gain Amplifiers
                + Programmable Filters and Comparators
          o 8 Digital PSoC Blocks Provide:
                + 8- to 32-Bit Timers, Counters, and PWMs
                + CRC and PRS Modules
                + Up to 2 Full-Duplex UARTs
                + Multiple SPIâ„¢ Masters or Slaves
                + Connectable to all GPIO Pins
          o Complex Peripherals by Combining Blocks
    * Precision, Programmable Clocking
          o Internal 2.5% 24/48 MHz Oscillator
          o 24/48 MHz with Optional 32 kHz Crystal
          o Optional External Oscillator, up to 24 MHz
          o Internal Oscillator for Watchdog and Sleep
    * Flexible On-Chip Memory
          o 16K Bytes Flash Program Storage 50,000 Erase/Write Cycles
          o 256 Bytes SRAM Data Storage
          o In-System Serial Programming (ISSPâ„¢)
          o Partial Flash Updates
          o Flexible Protection Modes
          o EEPROM Emulation in Flash
    * Programmable Pin Configurations
          o 25 mA Sink on all GPIO
          o Pull up, Pull down, High Z, Strong, or Open Drain Drive Modes on all GPIO
          o Up to 12 Analog Inputs on GPIO
          o Four 30 mA Analog Outputs on GPIO
          o Configurable Interrupt on all GPIO
    * Additional System Resources
          o I2C Slave, Master, and Multi-Master to 400 kHz
          o Watchdog and Sleep Timers
          o User-Configurable Low Voltage Detection
          o Integrated Supervisory Circuit
          o On-Chip Precision Voltage Reference
    * Complete Development Tools
          o Free Development Software (PSoCâ„¢ Designer)
          o Full-Featured, In-Circuit Emulator and Programmer
          o Full Speed Emulation
          o Complex Breakpoint Structure
          o 128K Bytes Trace Memory
Never bought the POD ICE system they used. Nice idea, too expensive for a hobbyist like myself. I need to buy a programmer though :) Although they don't mention it, the MCU core is worse than a PIC's. At 24MHz (ah, nice having such a fast internal clock, and an integrated 32Khz crystal, too!), it does only 4 MIPS.

The clock's not all that accurate, however, external crystals and an external RTC clock crystal can be used. I just noticed that the datasheets mention that you can use the external 32.768KHz crystal to accurately PLL the 24 MHz system clock... now that's one heck of a PLL. The high speed clock is used for clocking the digital and switched capacitor analog blocks.

Digital blocks are in 2x4unit columns, and each do 8 bits, but can be daisy chained to 32 bits. Analog blocks are in 4 columns. Top of each column is a continuous time block (programmable resistor network). The next two are switched capacitor blocks. It's amazing what you can cram onto a chip like this. My IMU design had a four pole low pass filter, dual programmable gain arrays, and a dual sampling ADC. And still had resources to spare. And, since it can be configured on the fly, I could use this setup to sample my gyros and accelerometers with no extra hardware.

On a side note, if you'd like some useful literature, I'd suggest reading Circuit Cellar magazine (}. I read each issue cover to cover, and it has lots of uses for all sorts of controllers, and introduces some of the more advanced ideas from time to time (FPAA, FPGA). They also like running a few contests a year. My entry into their Cypress PSoC $30K High Intergration Challenge isn't going to be done in time, but I got a free USB programmable CY8C27643 on a 28? pin wide DIP board AND a free license for their current stable release of their C compiler (Asm and PSoC configurer is free). It was going to be a single processor 6DOF IMU unit. No external signal conditioning required, all done on chip.

Actually, if you do start looking into these, they give away the code in their application notes used in the FTDI chip to actually program the PSoC. And IIRC the board schematic. Instant programmer design.

I'd also want to move up to their 48 pin SOIC design to get more digital I/O and I'm waiting for their next series to come out. They double the number of digital blocks, increase flash from 16 to 32Kbytes, increase RAM from 256 bytes to 2K, add a second 8x8 hardware multiplier, and add a 100 pin TQFP package option :) Much better for C programs. ... c29466.pdf
By Guest
In the latest Digikey catalog, the prices on PSoC have come way down. They are competitive with any of the 8-bit uCs. I've just been driven away by the IDE. Zillions of goodies, but unbelievably disorganized. They have lots of documentation, but it's hard to get the big picture. They need to get their documentation and ergonomic act together. Otherwise, it's just too much learning curve.

The hardware is a great concept. What they need is to do, though, is provide some templates to emulate various virtual microcontrollers, so you don't have to design the hardware and the firmware on every project. Great potential, if it were just a little easier to get up and running.

Their fatal mistake was to do the IDE themselves. They need to pay an outside firm to develop a simpler IDE, and then hand it out free. Right now, it takes too may hours just to determine if it is feasible to use a PSoC.

And, I was thinking exactly what you were thinking about these being ideal for instrument front-ends. And a lot of other applications, both connected, and stand-alone. I just wish that I could start diddling with them without spending 100 hours just to figure out how you're supposed to use them.
User avatar
By sparky
I got the PSoC design contest kit as well. Cypress has some interesting stuff, but I am too stuck in my ways to try anything else. I took a look at the IDE, and completely agree with you. Lots of eye candy, just too many buttons. All I want is a compile and load button. But many swear by the IDE. I have a feeling Cypress is on the right track, just too far ahead of the curve. With ARMs getting huge, we may need fancier IDEs just to follow what all is going on.

By SOI_Sentinel
I've worked with flashier GUI's. I still intend to (eventually) find the time to go and hack their XML based setup scripts to build my own modules. Anyway, reviewing the hardware now, after a lot of research into FPGA's, DSP (reading a good book on it right now), and the like, I realize how much of the hardware onboard is meant to turn it into a single chip, slow DSP. Hardware 8x8 multiply and 32 bit accumulator, ADC and DACs, antialiasing and reconstructive filters. Really, getting to the point of programming took me the longest. As I didn't read everything at first, the digital/analog config took me a while to understand the placement, but after I got a handle on that, it's just another small 8 bit processor.

Hopefully they'll create higher pin packages, better analog, a new MCU core (16 bit?) in the future sometime. Cypress does have some pretty good high density CPLD's after all, so at least a more flexible digital side may be possible.

I know TI's throwing some basic reconfigurable logic onto their ARM based "Analog processors". A few vendors (Xilinx, Atmel) integrate hardware processors into various levels of FPGA's or you can build your own. Then theirs' the ispPAC reconfigurable analog front ends, and everything's getting an ADC these days. Taken together, you can beat the capabilities of a PSoC, but it' still hard to beat the price for low cost systems.

Gah, I have no project focus anymore... back to my DSP book
By todd
disclaimer: I am a lab monkey for the part of Cypress that makes PSoC.

At the online store:
PSoC Evaluation Kit (CY3210-PSoCEval1) is $65.
PSoC Mini Programming Kit (CY3210-MiniProg1) is $35.

There are schematics and software for a homebuilt programmer in this thread at (I have not tried it but some say it works).

One major benefit from PSoC that most people don't understand is the reconfigurability. I only need to stock one part (like a 29xxx series 28DIP) instead of choosing between lots of different PICs. The MiniProg does in-circuit programming (and re-programming) and sections of the code can be protected with various settings.

As far as messing around in the XML: it is totally unecessary. Just edit the necessary registers in your code. Even then, I have seen _very_ few configurations not covered by the included User Modules and their API's.

I've been wondering for quite a while now, what would it take to get a hardcore PIC user to try out PSoC? Is there a market for an IDE without lots of confusing buttons (a general-purpose, cheap PSoC micro without the reconfigurability)?
By SOI_Sentinel
Lab monkey - Here, have a digital banana...

Wow, never saw the Eval or mini programming kit before. I'm going to have to order one of them. I've been waiting for the 29 series for a while. Now all they need is a 16 bit core for a more computational family :)

I have a decent sense for its reconfigurability. I sometimes wish it had a CAN interface, but I can fix that with an SPI chip. I'm still planning on using them for my 6 DOF inertial engine. I wouldn't ever cut off the digital or analog blocks (more of them, and maybe a higher performance analog grade of chips in the future would be nice), but what I fear stalls a lot of designers is the low MIPS per MHz. I still need to work on my code to see if if the M8 core can read position updates and filtering well enough to be used as an integrated IMU or if a master processor will be needed to do the more math intensive calculations.

And Todd, you're right. I will be editing the registers in my code. Much of my initial IMU concept requires little reconfiguration, and I can save RAM and ROM by just moving ADC inputs about and adjusting PGA gains instead of saving a configuration for each sensor lead (double and triple ADC). Also keeps me from interrupting critical SPI/I2C communications if the reconfiguration utility isn't smart enough to realize what's "hardwired"