tag 标签: PsoC

相关博文
  • 热度 19
    2014-11-12 16:55
    2626 次阅读|
    0 个评论
    In my previous blog , I briefly tackled the Programmable System-on-Chip (PSoC) devices from Cypress Semiconductor.   The PSoC devices offer varying amounts of programmable analog and programmable digital fabric and memory. Members of the PSoC 1 family also include Cypress's proprietary 8-bit M8C processor core; members of the PSoC 3 family include an 8-bit 8051 core; members of the PSoC 4 family include a 32-bit ARM Cortex-M0 core; and members of the PSoC 5 family boast a 32-bit ARM Cortex-M3 core.   For my current project, I decided that a PSoC 4 would be able to offer all the capabilities and functions I require. With the aid of the PSoC 4 Pioneer Kit (Arduino shield compatible), I quickly established that the PSoC 4200 would meet my needs. Since this project was a rush job, I quickly committed to a PCB so that it could be produced in parallel with the rest of the development.   For maximum configurability, PSoC devices contain reconfigurable logic blocks called Universal Digital Blocks (UDBs). The PSoC 5 has up to 24 of these UDBs while the PSoC 4200 has 4 (the PSoC 4100 has none). In the PSoC 4, some of these UDBs are replaced with components that are not as configurable. In some cases, the I/O pins are proscribed, nudging this approach closer to a normal microcontroller. When comparing the PSoC 4 to the PSoC 5, in addition to the differences between the ARM Cortex M0 and M3, there are also differences with regards to the clock frequency, Flash, SRAM, and the speed of the peripherals like the ADC (analog-to-digital converter).   As a starting point for my project, I required a two-channel ADC. You can see its placement on the device schematic in Figure 1.   Figure 1. The ADC component has been placed and the input pins named and attached. Part of the configuration of the ADC options is shown here.   My initial thought was that the IP block for the ADC on the PSoC 4 would be nominally the same as on the PSoC 5 (which I used for a previous project), but this was not the case. Cypress has rethought this and created the ADC block with quite a few nice touches. Even though there is only one ADC, it can be configured with up to four differential channels that will automatically sequence through their conversions (you can set delays on each conversion). Furthermore, you can build in averaging automatically, thereby saving you writing the code. Other IP components in the device show a similar flair.   In order to drive my bi-colored LEDs (as discussed in my previous blog) I needed a PWM controller, but I wanted to use a single PWM for both the red and green since I wasn't varying the shade of orange. I added a few logic gates as illustrated in Figure 2, and I had the functionality that I was looking for. You can't do that on many micros!   Figure 2. The output of the PWM is conditioned by the addition of two AND gates and a control register so that I can have blank, red, green, or orange, with the brightness being controlled by the PWM ratio. The second bi-color LED has another PWM controller configured in exactly the same way.   After I had realized this approach, I was looking at the different components (in the form of IP configurations) and came across a device called a PrISM (Precision Illumination Signal Modulation) which had two PWM outputs and the ability to independently control them, which is pretty much had what I had set up. It also has a pseudo random PWM variation to reduce EMI noise. Unfortunately, this is where I bumped into having laid out the PCB beforehand. There weren't enough resources to allow me to use the PriSM and the SPI controller and some other components that I had selected. If I had laid out the PCB for the fixed output pin version of the SPI, everything would have been fine. It would have been nice to use the PrISM, but not using it wasn't a show-stopper.   Amongst the multitude of "components" that are provided, there is also a switch de-bouncer, which makes coding and debugging even easier. There are also gates, flip-flops, counters, timers, quadrature decoders, and registers to name but a few, as well as the "CapSense" touch button ability. An additional benefit is that you can bring out the internal nets by wiring them to unused pins, and I would say that making sure you keep a couple of pins free is good design practice when using a PSoC.   On the downside, I am not impressed with the watchdog timer and there are some elements of the development environment that irritate me. I have worked with many different emulators and there are some aspects to this one that seem a little petty. I can live with only four hardware breakpoints (I think it used to be three -- it looks like they have added one), but what really irritates me is that when the process hits a breakpoint, you have to clear that breakpoint to continue. Apparently this is because if you have a pending interrupt -- and who doesn't have a tick interrupt? -- the next instruction executed will be in the interrupt routine, after which it will return to the breakpoint and stop, so you never progress.   Let me explain this a little more. Assume you hit the breakpoint and you haven't quite figured out what the problem is. You want the program to run through the "loop" and then break at the same point, but you have to clear the breakpoint to continue. The only way round this is to set a new breakpoint an instruction or two later in the code, turn off the current breakpoint, run to the new breakpoint, renew the original breakpoint, turn off the temporary breakpoint, and then continue. This is time-consuming and mouse-intensive. Single-stepping has much the same issue and I hardly use it. No other emulator that I have used has this problem, but then those also stop the clock to the peripherals, so no interrupt would occur anyway.The emulator also seems to have a bug that it locks up in some circumstances. I am told that the latest version, Creator 3.0SP1, solves this.   And I have a word of general caution for all compiler users. The Keil compiler uses the paradigm of a debug and release mode when it comes to the output .hex file. Unfortunately, the two results don't have the same optimization settings. I had coded a bit-banging SPI to use with a test jig and it worked fine when I was debugging, but in the "release" version it would not work. It turned out the compiler had optimized away the dummy memory accesses (like cDummy++;) that I had used for set up delay and the like, and possibly even the bit toggles. The end result was that 24 clock pulses were merged into a single clock pulse and, of course, the receiving shift register did not work. Once I had adjusted some of the optimization settings, the problem was resolved.   Figure 3. The finished product. There are also two SOIC8s and a few resistors on the underside.   Working with a PSoC, you can really configure everything to your heart's content. This is great fun, which is why I like to work with these parts. If there is a problem, you can change your approach in a flash (pun unintended) without changing the PCB. My final configuration for this project has two PWMs (with additional gating), a dual-channel, single-ended 12-bit ADC (with scanning and averaging), four de-bounced inputs, an SPI master, and two op-amps.   Just so you know, I have no affiliation whatsoever with Cypress Semiconductor -- I just like using their PSoCs. How about you -- have you used these devices, or are you thinking about doing so? If you are interested in discovering more, you might want to take a look at the PSoC 4 CY8CKIT-049 4xxx Prototyping Kits, which are an amazing bargain at only $4 each.   Aubrey Kagan is engineering Manager at Emphatec .
  • 热度 20
    2014-8-14 16:39
    1783 次阅读|
    0 个评论
    Ever since I was a young lad, I've been enthralled by the haunting tones of the Theremin. Of course, things have come a long way since this instrument was invented in 1919 by the Russian physicist and musician Leon Theremin.     Quite apart from anything else, it is no longer obligatory to present oneself in formal dress to play one of these beasts, and I'm sure we are all truly thankful. As far as I'm concerned, Hawaiian shirts are much more in tune with this style of music (pun intended).   It's amazing how this topic keeps on popping up. For example, I remember watching a repeat episode of The Big Bang Theory not so long ago in which Sheldon is playing a Theremin.     Every time I see one, I think to myself "Ooh, shiny. I want one of those." Of course, I've tried building one in the past (who hasn't?), but the result was less than spectacular. In fact, the sound was so interesting that everyone asked me to stop playing it, much like my experiments with the Scottish bagpipes. I fear that people are losing their love of music, but perhaps we should explore that topic in a future blog.   The thing is that I just saw an EE Times article by R. Colin Johnson on something called a Theremini. His article linked to this YouTube video , in which Dorit Chrysler, co-founder of the New York Theremin Society, explores the sonic possibilities of the Theremini.     What can I say? I love the Theremini. I immediately bounced over to this Amazon page to see how much the little rascals cost. I tell you, I spend so much time and money on Amazon that I think it is going to name one of its warehouses after me.     I don't care what you say. I think the Theremini looks uber-cool -- truly a Theremin for the 21st century. But I'm less than enthralled by the $299 price tag (sad face).   My chum Jay Dowling is always sending me links to interesting things, so I sent him a link to the Theremini and said, "I want one of these!" Jay is a big supporter of the programmable SoC (PSoC) devices from Cypress Semiconductor. Almost immediately, he responded, "Or you could save yourself $300 and make one for free using a PSoC kit:" PSoC 4 Pioneer Kit Theremin Project PSoC Configuration files for Theremin   Well, that was a surprise, not the least because, by some strange quirk of fate, I happen to have a PSoC 4 Pioneer Kit sitting on my desk looking up at me whispering "Use me... use me..."   How about you? Have you ever owned and played a Theremin? If so, what did you think of the experience? And what do you think about the Theremini? Is this something you might invest in, or would you be more inclined to construct your own version?
  • 热度 23
    2014-8-13 16:11
    1825 次阅读|
    0 个评论
    Over the last couple of weeks, I have been having a lot of fun implementing a simple audio spectrum analyser using a pair of MSGEQ7 chips (designed by Mixed Signal Integration and purchased from SparkFun ). For the digital processing and control portion of the system, I'm using a chipKIT MAX32 microcontroller platform featuring a 32-bit MIPS-based processor from Microchip Technology running at 80 MHz.   The columns on my project have received quite a few comments, including one from Sree Harsha Angara (a.k.a. Mithrandir), a senior applications engineer in Bangalore, India, for Cypress Semiconductor. "My interest is piqued now," he wrote. "I'll see if I can get the front-end filtering running on my PSoC 4 Pioneer kit. Weekend project, here I come :)"   Over the last few years, several of my friends have told me I should start playing with programmable SoC (PSoC) devices from Cypress. In particular, the PSoC 4 looks rather interesting, with its mixture of programmable analog fabric (opamps, 12-bit 1Msps SAR ADC, etc.), programmable digital fabric (four PLD-based logic blocks), and a 32-bit ARM Cortex-M0 processor running at up to 48 MHz. I particularly like the 1.7-5.5V operation.   Anyway, Sree and I ended up exchanging several emails. I learned that he "works mostly on power supervision designs and almost any other customer designs that come my way." He takes "a personal interest in control theory, digital filters, and power electronics." He's currently writing a series of columns on PID controllers on EEWeb. He's "always crawling around EE Times," and he reads my blogs in particular "because of the fun projects." Ooh, he knows how to get my attention (LOL).   Eventually, Sree sent me an email saying, "Hurray, I finally got my hands on an audio splitter. I also got some time to get to the filter design and I'm pretty satisfied with it. A quick peek of the characteristic curves is as shown below:"     When I asked Sree whether these curves were theoretical or empirically measured, he explained: "I create these curves the old-fashioned way using Excel. The curves I show here are theoretical, but I generally make it a habit to perform a simple Excel simulation in the digital domain once all the nasty transforms and fixed-point bit shifts are done."   A few days later, Sree sent me another email saying, "It's Alive!" It seems that he used his PSoC 4 to create "an exact replica of the MSGEQ7 chip with its seven band-pass filters and peak detectors." He also sent me a link to link to this video showing his PSoC 4 accepting an audio stream, emulating a MSGEQ7, and driving seven LEDs.     Do you recall my blog from a couple of months ago about the 32-bit PSoC 4 dev board ? Since then, I've ended up with 41xx and 42xx versions of these PSoC 4 Prototyping Kits, along with a PSoC 4 Pioneer Kit, so I asked Sree if I could implement his design on these boards. He replied: "This implementation just uses one SAR ADC and the whole filter runs through a single interrupt routine. That being said, you need seven PWMs to drive the LEDs -- I basically use four fixed-function PWMs and the other three are implemented using UDBs (Universal Digital Blocks)." He also provided the following block diagrams.   Block diagram showing the analog functions used in this PSoC 4 design.   Block diagram showing the digital functions used in this PSoC 4 design.   Sree says we still have about 50-55% of the processing power free. Also, it seems that he's run across another really interesting method called the Goertzel algorithm for frequency detection. In his last message to me, he said: "I'm still chugging along with the Goertzel algorithm, but on first sight it's a lot more complicated than simple band-passes and I'm having some difficulty wrapping my head around it."   I, for one, have every faith in Sree, and I look forward to reporting on his progress with the Goertzel algorithm in a future blog. In the meantime, what do you think about the PSoC 4 devices?
  • 热度 15
    2014-6-26 15:49
    2215 次阅读|
    0 个评论
    Recently, I had a task to design a two-channel signal converter from a bipolar input voltage to a bipolar output current. I immediately assumed that this was going to be a pure analogue design, but there was something that niggled at me. One of the explicit requirements was that each channel was to have a bi-colour LED that varied in brightness proportional to the input signal, and that changed between green and red to indicate when the signal was positive or negative, respectively.   There were two issues. First, the LED drive would need to be boosted so that there is no dead zone around zero. Second, I could foresee a condition where the signal would be negative, but the LED (and possibly the output) was positive, and vice versa. The mechanical equivalent of this is called backlash. Rather than drive the LED with a variable voltage, I considered using a PWM (pulse-width modulated) driver like the LTC6992 from Linear Tech, but I would still have to generate an offset and it didn't solve the backlash issue. Also, I would need two of them (one per channel), and there would have to be additional circuitry to change from red to green. Thus, it was a logical jump to look at low-end microcontrollers (MCUs).   I started off by looking at Microchip, but the ones I found were of the 16C family with small memories, which meant using assembly language. I have worked on three projects with the 16C family (five if you include the Scenix/Parallax SX28 which used the same opcodes as the Microchip), and I am afraid I never felt at home with the paucity of instructions (it being a RISC device) to say nothing of the memory segmentation issues. Succumbing to my bias, I then looked at NXP devices and Freescale ARM Cortex-M0 chips. There are so many variations to choose from that I balked at them as well.   Additionally, sometime ago we started a project using Freescale's CodeWarrior Development Studio (that project was significantly more complex than the project in this column), but we discovered we would need to pay for support to obtain the response that we needed. Add another bias to my psychology.   Now, I will be the first to tell you that I am a fan of PSoCs (Programmable SoCs) from Cypress Semiconductor. I have worked on many smaller projects with the PSoC 1 and one large project with the PSoC 5 ; also, I had heard some hype about the PSoC 4, which is ARM Cortex-M0-based. I looked at the price of the PSoC 4 and I was pleasantly surprised.   Fortunately, my project had some maneuverability on price, and I am aware that the flexibility of the PSoC configuration normally has some payback with the reduction of external devices. Of course, we already have the emulator and some experience, so I decided to look into this device further with the aid of the PSoC 4 Pioneer Kit (Arduino shield compatible). This kit uses the versatile PSoC 4200 family, so that was the starting point of my project.   Cypress provides a great development environment called PSoC Creator, which allows you to configure, program, and debug their products (there is a very useful series of video series on using PSoC Creator).   The PSoC architecture sits somewhere between an MCU and an FPGA. In addition to the processor core, it has some configurable analogue circuitry along with some programmable digital fabric, although this fabric is not as granular as one would find in an FPGA. You also get a whole bunch of IP with the device (termed "components") that allow you to configure the device to perform the functions you require. One aspect of the development environment is illustrated in Figure 1.   Figure 1. Starting to place the components   You need an ADC? Just choose it from the component selection area along the right and plonk it down. You want a PWM? There you go. An opamp and/or an SPI controller? You're welcome. Connect them together as you would on a schematic. Choose what pins to associate with the various functions, compile the hardware, and you are ready to write your application. Each component that you place has its code and headers placed in the "Workspace Explorer" (shown on the left in Figure 1) alongside your code. All the API calls are included in the header files and you can simply copy and paste into your code. You can see the symbol in the bottom right hand corner with the option to "Open Datasheet" (please forgive the eyestrain). Each component has its own data sheet that you can access before you place it, or by right-clicking after you've placed it.   PSoC Creator, which includes a Keil C compiler, is free. Support is also free. As an added bonus (here is my prejudice again), this system is not Eclipse-based. If you really want to be adventurous, you can create mini-state machines and other functions in hardware using a technique Cypress calls "datapaths." You can even use Verilog if you know what you are doing.   In my next blog I will use my project to describe the design process in a little more detail. In the meantime, I welcome any questions or comments.   Aubrey Kagan is engineering Manager at Emphatec .
  • 热度 27
    2014-6-18 18:13
    1392 次阅读|
    0 个评论
    I just received an email from a reader, Betajet, posing an interesting problem:   Hey Max, if a major semiconductor company offered a 32-bit development board for $4.00, you'd think that was pretty big news, right? Well, by happenstance, two days ago I discovered these CY8CKIT-049 4xxx Prototyping Kits for the PSoC 4 from Cypress Semiconductor. The PSoC 4 is a nice little chip, and previously the cheapest development board was the $25 PSoC 4 Pioneer Kit. Take a look at these $4 boards: they have a break-away USB serial interface for programming and DIP I/O holes for use in a breadboard. These have got to cost a lot more than $4.00 to make and distribute, so clearly Cypress is losing money on the board to try to get more people to check out the PSoC 4. So here's my question: why is such an obviously nifty board getting virtually no publicity? The Cypress documentation has been around since at least February and it's well stocked at Mouser and Digi-Key. A puzzle. Seems like a nice little board. Thought you'd be interested.   Well, I must admit to being intrigued. Betajet poses an interesting question. Why is an obviously nifty board getting virtually no publicity? Maybe it's a conspiracy. Hang on. Since I haven't reported about this before, maybe I am part of that conspiracy.   Of course, there is a simpler explanation, which is the fact that no one told me about such a board. As Betajet says, he ran across this board by accident, and he's very knowledgeable about... well, just about everything, now that I think about it.   The PSoC 4 is a very clever little device that boasts a 32-bit ARM Cortex-M0 processor core running at up to 48 MHz, up to 32 kB of flash and 4 kB of SRAM, programmable analog and programmable digital fabric, and CapSense Touch Sensing technology.   Off the top of my head, I don't recall seeing anything like this snap-off USB connector. My understanding is that you can program and reprogram the device using your PC; then, when you are ready to rock and roll, you can snap off the programming end and embed the business end of the stick in your product.   At only $4, these are an incredible bargain, and we all need to snap some of these up while the snapping is good.
相关资源
  • 所需E币: 0
    时间: 2023-4-22 12:55
    大小: 8.05MB
    上传者: EPTmachine
    安路FPGASF1系列数据手册
  • 所需E币: 3
    时间: 2022-10-5 23:14
    大小: 1.14MB
    上传者: ZHUANG
    PSoC软硬件协同设计的嵌入式实时视频监控系统
  • 所需E币: 5
    时间: 2021-9-19 20:38
    大小: 1.66MB
    上传者: ZHUANG
    基于PSoC的矿用传感器模拟电路设计
  • 所需E币: 0
    时间: 2021-3-23 23:59
    大小: 5.64MB
    上传者: stanleylo2001
    Cypress-针对可穿戴设备的PSoCIoT平台
  • 所需E币: 0
    时间: 2020-11-12 23:52
    大小: 5.71MB
    上传者: czdian2005
    基于psoc的家电wifi无线控制系统的分析与实现
  • 所需E币: 0
    时间: 2020-9-28 21:15
    大小: 587.69KB
    上传者: LGWU1995
    利用具有I_O模拟多路复用器的PSoC简化传感器控制设计
  • 所需E币: 4
    时间: 2019-12-26 01:28
    大小: 2.82MB
    上传者: quw431979_163.com
    PSoCProgrammer……
  • 所需E币: 4
    时间: 2019-12-27 19:43
    大小: 24.08MB
    上传者: 微风DS
    如何使用PSoCDesigner5.0设计电容式触摸感应项目……
  • 所需E币: 3
    时间: 2019-12-27 19:44
    大小: 15.07MB
    上传者: 二不过三
    基于PSoC的无刷直流电机(BLDC)控制……
  • 所需E币: 5
    时间: 2019-12-27 19:47
    大小: 12.04MB
    上传者: givh79_163.com
    EZ-Color101培训模块:PSoCExpress设计和温度反馈……
  • 所需E币: 3
    时间: 2019-12-27 19:47
    大小: 33.94MB
    上传者: 238112554_qq
    PSoCDesigner5.0_101_利用PSoCFirstTouch入门工具介绍PSoCDesigner5.0……
  • 所需E币: 3
    时间: 2019-12-27 19:46
    大小: 5.93MB
    上传者: rdg1993
    PSoC_Designer_Module_2……
  • 所需E币: 3
    时间: 2019-12-27 19:46
    大小: 11.11MB
    上传者: 2iot
    PSoC_Designer_Module_3……
  • 所需E币: 4
    时间: 2019-12-27 19:46
    大小: 7.5MB
    上传者: 二不过三
    PSoC_Designer_Module_4……
  • 所需E币: 5
    时间: 2019-12-27 19:46
    大小: 20.07MB
    上传者: rdg1993
    PSoC入门培训模块:如何使用PSoCExpress和FirstTouch入门工具……
  • 所需E币: 5
    时间: 2019-12-27 19:45
    大小: 14.3MB
    上传者: givh79_163.com
    基于PSoC的步进电机的控制……
  • 所需E币: 4
    时间: 2019-12-27 20:04
    大小: 1.52MB
    上传者: 978461154_qq
    利用PSoC1系列芯片中的可编程模拟单元可实现对步进电机的高细分数和精确的正弦波形控制。图1为利用PSoC1实现以上步进电机驱动器方案电路图,只需一个芯片,就可实现可编程模拟电路,例如高速/低速比较器,DAC等功能模块,以及可编程数字电路,并且利用芯片内的模拟/数字总线非常方便灵活地进行互联。……
  • 所需E币: 5
    时间: 2019-12-25 16:57
    大小: 94.33KB
    上传者: quw431979_163.com
    赛普拉斯可编程片上系统™(PSoC™)CY8C29xxx器件具备独特的、可配置的模拟资源,理想地适用于传感器和无传感器汽车无刷DC(BLDC)马达应用。汽车电器马达控制应用包括前后车窗雨刮器、动力方向盘控制、通风、风扇、座椅位置调整、天线位置以及车窗升降控制等。扩展的模拟外围器件包括放大、滤波以及PSoC器件的模数转换器(ADC)和比较器等,不再需要可调滤波器,也不会再为让人挠头的栅式比较器(gatedcomparator)电路发愁,从而大幅减少了组件数量。PSoC采用精确的脉宽调制器(PWM)马达传动控制和各种串行接口标准,有助于确保车辆信息网络的连接畅通无阻。……
  • 所需E币: 4
    时间: 2019-12-31 16:42
    大小: 311.08KB
    上传者: 微风DS
    模拟开关电容PSoC模块数据表SCBLOCKV2.4文件。模拟开关电容PSoC模块数据表SCBLOCKV2.4001-66406Rev.**AnalogSwitchedCapacitorPSoCBlockCopyright2002-2011CypressSemiconductorCorporation.AllRightsReserved.PSoC模块API内存(字节)引脚(每个外资源数字模拟CT模拟SC闪存RAM部I/O)CY8C29/27/26/25/24/23/22xxx、CY8CLED04/08/16、CY8CLED0xD、CY8CLED0xG、CY8CTST120、CY8CTMG120、CY8CTMA120、CY8C28x45、CY8CPLC20、CY8CLED16P01、CY8C28x43、CY8C28x52001……
  • 所需E币: 4
    时间: 2020-1-3 18:29
    大小: 139.52KB
    上传者: 238112554_qq
    采用PSoC的电荧光背光显示控制器应用手册AN2244采用PSoC的电荧光背光显示控制器作者:SteveGerber相关项目:是相关部件系列:CY8C22xxx、CY8C24xxx、CY8C27xxx、CY8C29xxxPSoCDesigner版本:4.1摘要电荧光背光显示(EL-显示)通常用于汽车仪表板的夜间背景照明。本应用手册将详细介绍EL背景灯参考设计的有效微控制器配置。赛普拉斯微系统公司(CypressMicroSystems)与Rogers公司合作开发了该参考设计。[有关DUREL器件和系统级实施详情,敬请参见参考设计中的单独应用手册。]前言PSoC结构图EL背景灯参考设计的基本配置包含三个主要部分:EL图1所示的是简化的结构图。ADC负责监控电位计电灯泡、驱动器和控制器。驱动器器件采用压,用以指示用户所需要的预期亮度,从而便于仪表Rogers-DURELD3……