PSo C [PDF]

  • 0 0 0
  • Suka dengan makalah ini dan mengunduhnya? Anda bisa menerbitkan file PDF Anda sendiri secara online secara gratis dalam beberapa menit saja! Sign Up
File loading please wait...
Citation preview

PSoC (Programmable System on Chip) merupakan sebuah IC 8-bit (Integrated Circuit) keluaran Cypress Semiconductor yang ditujukan untuk rancang bangun sebuah “ Embedded System “. PSoC memiliki fungsi kerja mirip seperti sebuah mikrokontroller, tetapi dengan berbagai kelebihan dan kekurangan. Pada umumnya Mikrokontroller yang sering digunakan di Indonesia seperti Atmel MCS, Atmel AVR, dan PIC hanya memiliki fungsi terintegrasi digital saja. Fungsi digital yang dimaksud adalah I/O, PWM, ADC, Timer / Counter, UART, SPI dan fungsi-fungsi digital yang lain. PSoC muncul sebagai sebuah mimpi yang terjawab bagi para engineer, dengan munculnya pengolahan analog dan digital dalam satu IC yang dapat diprogram fungsi kerjanya sesuai dengan yang diinginkan. Beberapa fitur yang dimiliki PSoC adalah [9] : 1. MAC Unit, hardware 8x8 multiplication, dengan hasil yang dapat disimpan pada 32-bit Accumulator. 2. Tegangan kerja yang dapat diganti antara 5 V dan 3.3 V 3. Dapat bekerja pada tegangan 1 V dengan menggunakan mode SMP (Switch Mode Pump) 4. Frekuensi yang dapat dipilih sesuai keinginan kita. 5. Programmable Block yang dapat dipilih dan diprogram sesuai kebutuhan. 6. 16 KB Programmable Memori. 7. 256 bytes RAM (Random Access Memory) 8. ADC (Analog to Digital Converter) dengan resolusi mencapai 14-bit 9. DAC (Digital to Analog Converter) dengan resolusi mencapai 9-bit 10. PGA (Programmable Gain Amplifier) 11. Filter dan Komparator yang dapat diprogram 12. Timer dan Counter 8-bit, 16-bit dan 32-bit 13. Pseudorandom Sequences dan CRC Code Generator 14. Dua Full Duplex UART 15. Multiple SPI devices 16. Opsi untuk koneksi pada semua pin keluaran 17. Opsi untuk mengkombinasikan blok 18. Opsi untuk pemrograman pada lokasi memori yang spesifik dan Write Protection 19. Untuk setiap pin terdapat opsi untuk Pull-Up, Pull-Down, HighZ, Strong atau Open pin state.



20. Kemampuan untuk menggenerasi interupsi selama terjadi perubahan kondisi pin 21. I2C Slave atau Master dan Multi-Master sampai kecepatan 400 KHz



Struktur Dasar Blok PSoC Bagian-bagian yang ada pada PSoC : Unit CPU merupakan bagian utama dari Microcontroller PSoC yang tujuannya adalah untuk menjalankan perintah program dan mengontrol alur kerja blok lainnya Generator frekuensi memfasilitasi sinyal yang diperlukan CPU untuk bekerja, serta mengatur frekuensi yang digunakan oleh Programmable blok Kontroller RESET memungkinkan Microcontroller memulai tindakan dan membawa sebuah Microcontroller kembali ke keadaan biasa jika terjadi kejadian luar biasa. Watch Dog Timer digunakan untuk mendeteksi software deadloops.



Sleep timer dapat secara berkala membangunkan Microcontroller dari power saving mode. Hal ini dapat juga digunakan sebagai pewaktu reguler. Pin input-output berguna untuk mengaktifkan komunikasi antara CPU unit, blok digital dan analog dan dunia luar. Digital Programmable Block digunakan untuk mengkonfigurasi komponen digital yang dipilih oleh pengguna. Analog Programmable Block digunakan untuk mengkonfigurasikan analog, seperti AD dan DA converters, filter, DTMF receivers, Programmable, instrumental, inverting, noninverting dan operasional amplifier. I2C controller berfungsi untuk mengaktifkan hardware realisasi dari sebuah komunikasi I2C. Tegangan referensi dan SMP (Switch Mode Pump) sangat penting dalam pekerjaan komponen analog yang berada di dalam analog Programmable block. Unit MAC digunakan untuk operasi yang menandai perangkat keras dari perkalian angka 8-bit. PSoC Designer Sebuah IC Mikrokontroller memerlukan sebuah program untuk bisa bekerja secara embedded. Program tersebut biasanya dibuat menggunakan Personal Computer, lalu didownload ke dalam mikrokontroller. Jika pada mikrokontroller Atmel AVR ada AVR Studio, CodeVision, dll. Maka pada PSoC digunakan software PSoC Designer untuk mendesain fungsi kerja IC PSoC. Termasuk di dalamnya program dan konfigurasi-konfigurasi kerja blok yang ada di dalam PSoC. Disini akan dibahas beberapa blok-blok dasar dan karakteristik global pada PSoC Designer. Versi yang digunakan adalah PSoC Designer 5. Sedangkan desain akan difokuskan pada IC PSoC CY8C29466, karena sample yang ada untuk dipelajari hanya IC seri tersebut. Pada pembahasan kali ini, hanya akan difokuskan pada beberapa blok digital & analog yang merupakan fitur unggulan pada PSoC, yaitu : PWM (Pulse Width Modulator) Block = > 8 dan 16-bit PWM User Modules merupakan pembangkit / modulator lebar pulsa dengan periode dan lebar pulsa yang dapat



diatur melalui program. Clock dan Enable Signal dapat dipilih dari beberapa sumber. Sinyal keluaran dapat disambung dengan sebuah pin atau ke Global output Bus, untuk penggunaan internal modul yang lain. Sebuah interupsi dapat deprogram untuk memicu ketika tebing naik (rising edge) atau ketika pencacah (counter) mencapai kondisi terminal count. PGA (Programmable Gain Amplifier) Block = > PGA User Module mengimplementasikan Penguat Non-Inverting (Tak Membalik) dengan Gain (penguatan) yang dapat diatur dengan program. Penguat ini memiliki impedansi masukan tinggi, bandwidth lebar dan referensi yang dapat dipilih. BPF (Band Pass Filter) Block = > BPF2 User Module mengimplementasikan sebuah “GeneralPurpose second order state variable” , yang biasa disebut juga sebuah “biquad”, band pass filter. Frekuensi Center dan Q (rasio frekuensi center terhadap bandwidth) merupakan fungsi-fungsi dari frekuensi clock dan rasio dari nilai kapasitor yang dipilih. Frekuensi center dapat diset sangat akurat atau disesuaikan dengan mengendalikan clock “sample rate”. SC (Switched Capacitor) Block = > SCBLOCK User Module adalah sebuah “analog switched capacitor PSoC block” yang dapat diatur parameternya secara penuh, sehingga memungkinkan pembuatan fungsi “switched capacitor” secara custom. ADC (Analog to Digital Conversion) Block = > Blok ADC mengimplementasikan converter dari tegangan analog ke dalam bentuk digital dengan akurasi hingga 14-bit. Referensi tegangan juga dapat dipilih dari beberapa opsi yang diberikan. Sample rates dapat diatur dari 7.8 sps hingga 480 sps (sps = samples per second). LCD (Liquid Crystal Display) Block = > LCD Module merupakan satu set kumpulan rutin yang berfungsi untuk mengkonversi dari tulisan-tulisan (string) yang kita buat ke dalam bentuk 2 atau 4 jalur LCD Module. Modul ini didesain untuk mendukung penggunaan IC HD44780 sebagai driver LCD. Mode interface yang digunakan adalah 4-bit dengan tujuan untuk mengurangi jumlah pin I/O yang diperlukan.



Wikipedia PSoC (Programmable System-on-Chip) is a family of microcontroller integrated circuits byCypress Semiconductor. These chips include a CPU core and mixed-signal arrays of configurable integrated analog and digital peripherals.



History[edit] In 2002, Cypress began shipping commercial quantities of the PSoC 1. [1] To promote the PSoC, Cypress sponsored a "PSoC Design Challenge" in Circuit Cellar magazine in 2002 and 2004.[2] In April 2013, Cypress released the fourth generation, PSoC 4. The PSoC 4 features a 32-bit ARM Cortex-M0 CPU, with programmable analog blocks (operational amplifiers and comparators), programmable digital blocks (PLD-based UDBs), programmable routing and flexible GPIO (route any function to any pin), a serial communication block (for SPI, UART, I²C), a timer/counter/PWM block and more.[3] PSoC is used in devices as simple as Sonicare toothbrushes and Adidas sneakers, and as complex as the TiVo set-top box. One PSoC, using CapSense, controls the touch-sensitive scroll wheel on the Apple iPod click wheel. In 2014, Cypress extended the PSoC 4 family by integrating a Bluetooth Low Energy radio along with a PSoC 4 Cortex-M0-based SoC in a single, monolithic die.



Overview[edit] A PSoC integrated circuit is composed of a core, configurable analog and digital blocks, and programmable routing and interconnect. The configurable blocks in a PSoC are the biggest difference from other microcontrollers. PSoC has three separate memory spaces: paged SRAM for data, Flash memory for instructions and fixed data, and I/O Registers for controlling and accessing the configurable logic blocks and functions. The device is created using SONOS technology. PSoC resembles an ASIC: blocks can be assigned a wide range of functions and interconnected onchip. Unlike an ASIC, there is no special manufacturing process required to create the custom configuration — only startup code that is created by Cypress' PSoC Designer (for PSoC 1) or PSoC Creator (for PSoC 3 / 4 / 5) IDE. PSoC resembles an FPGA in that at power up it must be configured, but this configuration occurs by loading instructions from the built-in Flash memory. PSoC most closely resembles a microcontroller combined with a PLD and programmable analog. Code is executed to interact with the user-specified peripheral functions (called "Components"), using automatically generated APIs and interrupt routines. PSoC Designer or PSoC



Creator generate the startup configuration code. Both integrate APIs that initialize the user selected components upon the users needs in aVisual-Studio-like GUI.



Configurable analog and digital blocks[edit]



PsoC Block Example



Using configurable analog and digital blocks, designers can create and change mixed-signal embedded applications. The digital blocks are state machines that are configured using the blocks registers. There are two types of digital blocks, Digital Building Blocks (DBBxx) and Digital Communication Blocks (DCBxx). Only the communication blocks can contain serial I/O user modules, such as SPI, UART, etc. Each digital block is considered an 8-bit resources that designers can configure using pre-built digital functions or user modules (UM), or, by combining blocks, turn them into 16-, 24-, or 32-bit resources. Concatenating UMs together is how 16-bit PWMs and timers are created. There are two types of analog blocks. The continuous time (CT) blocks are composed of an op-amp circuit and designated as ACBxx where xx is 00-03. The other type is the switch cap (SC) blocks, which allow complex analog signal flows and are designated by ASCxy where x is the row and y is the column of the analog block. Designers can modify and personalize each module to any design.



Programmable routing and interconnect[edit] PSoC mixed-signal arrays' flexible routing allows designers to route signals to and from I/O pins more freely than with many competing microcontrollers. Global buses allow for signal multiplexing and for performing logic operations. Cypress suggests that this allows designers to configure a design and make improvements more easily and faster and with fewer PCB redesigns than a digital logic gate approach or competing microcontrollers with more fixed function pins.



Series[edit] PSoC is a software configured, mixed-signal array with a built-in microcontroller core. There are four different families of devices, each based around a different microcontroller core: 



PSoC 1 - CY8C2xxxx series — M8C core.







PSoC 3 - CY8C3xxxx series - 8051 core.







PSoC 4 - CY8C4xxxx series - ARM Cortex-M0 core.[4]







PSoC 5 - CY8C5xxxx series - ARM Cortex-M3 core.



Bluetooth Low Energy Starting in 2014, Cypress began offering PSoC 4 BLE devices with integrated Bluetooth Low Energy (Bluetooth Smart). This can be used to create connected products leveraging the analog and digital blocks.[5] Users can add and configure the BLE module directly in PSoC creator. Cypress also provides a complete Bluetooth Low Energy stack licensed from Mindtree with both Peripheral and Central functionality.[6]



Summary[edit] PSoC 1



PSoC 3 8-bit 8051 core (single-



8-bit M8C core



cycle)



up to 24 MHz, 4 MIPS



up to 67 MHz, 33 MIPS



Flash: 4 KB to 32 KB



PSoC 4



PSoC 5



32-bit ARM Cortex-



32-bit ARM Cortex-M3



M0



up to 67 MHz,



up to 48 MHz, ? MIPS 84 MIPS Flash: 32 KB to



Flash: 8 KB to 64 KB



Flash: 16 KB to 32 KB



SRAM: 3 KB to 8 KB



SRAM: 2 KB to 4 KB



I²C, SPI, UART,



I²C, SPI, UART, LIN,



I²C, SPI, UART



I²C, SPI, UART, LIN,



FS USB 2.0



FS USB 2.0, I²S, CAN



.



FS USB 2.0, I²S



1 Delta-Sigma ADC (6



1 Delta-Sigma ADC (8



1 SAR ADC (12-bit)



1 Delta-Sigma ADC (8



to 14-bit)



to 20-bit)



131 ksps @ 8-bit;



192 ksps @ 12-bit;



Up to two DACs (6 to 8-



Up to four DACs (8-bit) 8-bit)



SRAM: 256 bytes to 2 KB



bit)



1 Msps @ 12-bit; Up to two DACs (7 to



256 KB SRAM: 8 KB to 64 KB



to 20-bit) 192 ksps @12-bit; 2 SAR ADCs (12-bit)



1 Msps @ 12-bit; Up to four DACs (8-bit) Up to 64 I/O



Up to 72 I/O



Up to 36 I/O



Up to 72 I/O



Operation: 1.7 V to



Operation: 0.5 V to



Operation: 1.71 V to



Operation: 2.7 V to



5.25 V



5.5 V



5.5 V



5.5 V



Active: 2 mA,



Active: 1.2 mA,



Active: 1.6 mA,



Active: 2 mA,



Sleep: 3 μA



Sleep: 1 μA,



Sleep: 1.3 μA,



Sleep: 2 μA,



Hibernate: ?



Hibernate: 200 nA



Hibernate: 150 nA



Hibernate: 300 nA On-chip JTAG, SWD,



Requires ICE Cube and



On-chip SWD, Debug



FlexPods



SWV, Debug, Trace



CY8CKIT-040 Pioneer CY8CKIT-001



Kit



CY8CKIT-001



CY8CKIT-001



Development Kit



CY8CKIT-042 Pioneer Development Kit



Development Kit



CY8CKIT-030



Kit



CY8CKIT-050



Development Kit



CY8CKIT-049



Development Kit



Prototype Kit



Development tools[edit] PSoC Designer[edit] This is the first generation software IDE to design and debug and program the PSoC 1 devices. It introduced unique features including a library of pre-characterized analog and digital peripherals in a drag-and-drop design environment which could then be customized to specific design needs by leveraging the dynamically generated API libraries of code.



PSoC Creator[edit] PSoC Creator is the second generation software IDE to design debug and program the PSoC 3 / 4 / 5 devices. The development IDE is combined with an easy to use graphical design editor to form a powerful hardware/software co-design environment. PSoC Creator consists of two basic building blocks. The program that allows the user to select, configure and connect existing circuits on the chip and the components which are the equivalent of peripherals on MCUs. What makes PSoC intriguing is the possibility to create own application specific peripherals in hardware. Cypress publishes component packs several times a year. PSoC users get new peripherals for their existing



hardware without being charged or having to buy new hardware. PSoC Creator also allows much freedom in assignment of peripherals to I/O pins.



Cortex-M[edit] Main article: List of ARM Cortex-M development tools Generic ARM development tools for PSoC 4 and PSoC 5.



Documentation[edit] PSoC 4 / 5 The amount of documentation for all ARM chips is daunting, especially for newcomers. The documentation for microcontrollers from past decades would easily be inclusive in a single document, but as chips have evolved so has the documentation grown. The total documentation is especially hard to grasp for all ARM chips since it consists of documents from the IC manufacturer (Cypress Semiconductor) and documents from CPU core vendor (ARM Holdings). A typical top-down documentation tree is: manufacturer website, manufacturer marketing slides, manufacturer datasheet for the exact physical chip, manufacturer detailed reference manual that describes common peripherals and aspects of a physical chip family, ARM core generic user guide, ARM core technical reference manual, ARM architecture reference manual that describes the instruction set(s). PSoC 4 / 5 documentation tree (top to bottom) 1. PSoC website. 2. PSoC marketing slides. 3. PSoC datasheet. 4. PSoC reference manuals. 5. ARM core website. 6. ARM core generic user guide. 7. ARM core technical reference manual. 8. ARM architecture reference manual.



Cypress Semiconductor has additional documents, such as: evaluation board user manuals, application notes, getting started guides, software library documents, errata, and more. See External Links section for links to official PSoC and ARM documents.