HANDBOOK & MANUAL FOR PROGRAMMABLE SYSTEM ON CHIP LAB

Size: px
Start display at page:

Download "HANDBOOK & MANUAL FOR PROGRAMMABLE SYSTEM ON CHIP LAB"

Transcription

1 HANDBOOK & MANUAL FOR PROGRAMMABLE SYSTEM ON CHIP LAB Dr M K Deshmukh Aalap Tripathy (For Use in EEE GC 415 Embedded Systems Course) Dr M K Deshmukh Mr A Amalin Prince Mr M T Abhilash Draft Copy BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE - PILANI, GOA CAMPUS ZUARI NAGAR, GOA, INDIA 21 st November, 2007 Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 1

2 1. Introduction ` 2. Contents of Work Done 2.1 System Overview 2.2 Basic Functionality 2.3 Comparison with dspic 2.4 Digital & Analog Functional Blocks 2.5 SMP, MAC, Decimator 2.6 I2C Controller, Interrupt Controller, Address Space 2.7 Basic Module Description 2.8 Advanced Module Description 2.9 Specific Projects Blinking LEDs Controlling Blinking LEDs LCD Interfacing Digital Sine Wave Generation Manchester Code (generation) Single Pole IIR Filter Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 2

3 System overview and Special Mention PSoC mixed-signal arrays are programmable systems-on-chips (SOCs) that integrate a microcontroller and the analog and digital components that typically surround it in an embedded system. PSoC can be defined as software configurable silicon A single PSoC device can integrate as many as 100 peripheral functions with a microcontroller, saving design time, board space and power consumption. The PSoC microcontroller contains everything needed to run an entire system. Microcontroller CPU ROM (program) RAM (data) Bus i/f Controls Data bus Adress bus ALU ADC DAC Filter Amp Timer Many more PSoC offers a complete set of digital and analog peripherals which are easily configurable. o Amplifiers o ADC / DAC o Filters o Comparators o Timers o Counters o PWM o SPI o UART Flash, RAM, CPU, ports, and configurable blocks communicate with the CPU as separate systems. We can create Serial ports, timers, PWM generators, and other devices without adding additional circuitry. PSoC when compared to a Computer System: o CPU M8C CPU core o Cache Memory CPU registers A and X o RAM RAM o Hard Drive Flash Memory (ROM) The clock is tuned from the USB. There is no external crystal on board the Eval Kit. How is the Clock Generation done from the USB Project Topic? Of course there is an internal oscillator, so when used along with the USB, the PSoC can fine tune the main oscillator. The internal oscillator is rated for 2.5% accuracy. Can we test it?? The PSoC Microcontroller has 37 basic instructions. The C compiler breaks C code into these basic instructions. We can configure library elements to provide o analog functions such as amplifiers, ADCs, DACs, filters and comparators o o digital functions such as timers, counters, PWMs, SPI and UARTs. The PSoC family's analog features include rail-to-rail inputs, programmable gain amplifiers and up to 14-bit ADCs with exceptionally low noise, input leakage and voltage offset. Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 3

4 PSoC devices include up to 32KB of Flash memory, 2KB of SRAM, an 8x8 multiplier with 32-bit accumulator, power and sleep monitoring circuits, and hardware I2C communications. Comparison with dspic & BASIC Stamp BASIC Stamp from Parallax, the dspic from Microchip, and the PSoC from Cypress Semiconductors are potential processors for prototype implementation These devices differ from the other in features and implementation methods Comparison dspic BASIC Stamp PSoC Type 1 Design Uses built in peripherals + code + visual initialization techniques Uses native PBASIC Uses a Visual Designer PsoC Designer what can generate processor configuration files 2 Compiler Very Costly c.htm Free Costly 3 Features 2 UARTs PWM, serial communications, I²C and OWI communications 4 On the Flyprogramming Uses Building Block Approach As Many UARTs as allowed by pins and memory There is however a maximum limit on the number of digital and analog blocks per part Uses Building Block Approach Conditional Events and Interrupts can be used to load alternate program blocks 5 Pins I/O Pins Predefined User Configurable Pins 6 Development of Custom Custom Processor can be designed on the fly Blocks 7 Code Protection Advanced Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 4

5 The PSoC Core All PSoC s share a common core. The M8C CPU with speeds upto 12 MHz POR and LVD means Power on Reset and Low Voltage Detection It has configurable I 2 C, SPI interfaces. Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 5

6 With digital blocks, we can create for instance UART, PWM, SPI interfaces Each digital block is an 8 bit resource. To configure a 16 bit PWM for instance, we would need two digital blocks. With two analog blocks we can create an ADC of 14 bit resolution, Programmable comparators (COMP), Low Pass Filters (LPF) The pinouts are configured using muxes and routing tables. What We have 1. CY 3210-PsoCEval1 ($70) a. Chip is CY8C29466 b. Large number of extra chips of CY8C29466 can be used without the associated Eval board on standard breadboards 2. PSOC Express DK ($350) a. Contains 4 Fan Modules b. 2 Extension Modules c. 1 Master PSOC CY8C29666 d. Target PSOC CY8C PSoC Basic Development kit - $600 a. Includes In-circuit Emulator called ICE Cube 4. Imagecraft C Compiler 20 Nos. Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 6

7 Software Tools Used PSoC Designer launched in 2001 This is a Traditional IDE and is based on user modules. We can code in both C and Assembly to customize and integrate user modules with our projects. The default user modules are themselves written in Assembly (sometimes C) by Cypress. They enable functionality expected of standard electronic components which in turn can be chosen by a programmer That is on board resources of these components are highly configurable. PSoC Express This is a visual embedded system design tool and defines systems at the application layer. There is no C or Assembly coding needed. Considers programming on board components as lower level to be handled by the software itself based on the input and output definitions. Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 7

8 Design at User Module Level C and Assembly required for programming On Board resources are identifiable and highly configurable Complicated for first time users More flexibility Design at Application Layer C or Assembly handled completely by the software On Board Resources considered low level functions and handled by software Easy to use Hidden flexibility PSoC Assembly programming PSoC Assembler is built into the PSoC Designer. No further tools or investment in compilers is required. Like the 8086, PSoC has 10 addressing modes Goto Help Topics Assembly Language Reference Book Instruction Set for more information The basic modes can be summarized as : o Immediate : mov [2],65h o Direct : mov reg[2],15h Any location in square brackets refers to RAM locations When preceded by reg, it explicitly means register locations. Reg actually also means RAM locations but without restrictions. o Indexed : X register exclusively used. Without brackets, it means direct addressing. mov X,20h mov [X],15h //Moves 15 into location 20 in RAM //Can be used from reading from Memory as in 8086 //Called Offset Indexing Working With PSoC Express Design Elements in PSoC Express are : o Drivers o Transfer Functions o Valuators Drivers External devices which are to be chosen from the device catalog. (Catalog updated every quarter by Cypress) o Input Convert physical readings into values Accelerometer Temperature Sensor Current Sensor Airflow Sensor Humidity Sensor Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 8

9 Voltage Monitor o Output require user defined logic to generate physical condition Fans LCD LED o Interface enable communication with other devices which support specific protocols I2C SPI UART Transfer Functions Use logic to generate output values. They can be : o Table Lookup = Truth Table o Priority Encoder o Status Encoder Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 9

10 PSOC First Touch Basic Introduction Introduced by Cypress Semiconductors in 2007 as the ultimate starter kit. Combines applications available on multiple demonstration boards on a single easy to use device. This has native compatibility with PSoC Express Software. Consists of two parts o First Touch PC Bridge (FTPC) o First Touch Multifunction Expansion Cards (FTMF) The expansion port provides power, ground, and I2C or SPI communications to and from the expansion card host PSoC and PC. The FTMF Card consists of the components as shown below: FTMF expansion card has its own PSoC, and can be removed it from the FTPC bridge and inserted into any target hardware or other development platforms. We must ensure that while using PSoC Programmer, the Device Family is set to 21X34 and the Device Type is CY8C LFXI (this is the PSoC on the FTMF Expansion Card) Programming might be done in either PSoC Express or PSoC Designer Programming mode must be Reset Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 10

11 First Touch FTPC Bridge: Contains CY8C24894 PSoC as the only active device on circuit. The FTMF Expansion Card can also be used idependent of the FTPC Bridge First Touch Expansion Bridge: Contains a CY8C21434 PSoC which acts as the Host during programming Due to lack of onboard voltage regulators, VEXP on Pins 1 and 4 should be always <= 5V The 8x2 pin expansion header also includes four General Purpose IO (GPIO)connections labeled P02-P05. These are hard wired to four unused Port 0 IO pins on the CY8C21434 host and and allow connection of FTMF Expansion Card to specific hardware or sensors. These IO pins were specifically chosen because they have the ability to operate as analog outputs, analog inputs, digital inputs, digital outputs, or any combination of the four types; this pin selection makes them true analog or digital GPIO. Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 11

12 FTMF Pinouts Pin Port Application Design Function Number Number 1 P0[1] CapSense modulator capacitor 2 P2[7] CapSense slider element 7 3 P2[5] CapSense slider element 5 4 P2[3] CapSense slider element 3 5 P2[1] CapSense slider element 1 6 P3[3] Unused/no-connect 7 P3[1] CapSense feedback resistor 8 P1[7] I2C clock line (SCL) 9 P1[5] I2C data line (SDA) 10 P1[3] Red LED drive 11 P1[1] In system programming clock (ISSP_SCLK) 12 GND 13 P1[0] In system programming data (ISSP_DAT) 14 P1[2] Blue LED drive 15 P1[4] Green LED drive 16 P1[6] Alarm/buzzer FET drive 17 XRES In system programming reset pin (ISSP_XRES) 18 P3[0] Unused / no-connect 19 P3[2] Unused / no-connect 20 P2[0] CapSense proximity antenna pad (PRX1) 21 P2[2] CapSense slider element 2 22 P2[4] CapSense slider element 4 23 P2[6] CapSense slider element 6 24 P0[0] Thermistor temperature sensor analog input 25 P0[2] User A/D-GPIO 26 P0[4] User A/D-GPIO 27 P0[6] Ambient light detector analog input 28 +Vdd 29 P0[7] Thermistor drive-voltage reference analog input 30 P0[5] User A/D-GPIO 31 P0[3] User A/D-GPIO 32 GND Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 12

13 First Touch FTPC PinOut Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 13

14 First Touch FTMF Expansion Card PinOut Document Version of 21 st November, 2007 Created by Aalap Tripathy, 2004P3PS208 14

15 FTMF Expansion Card Functions A CY8C21434 PSoC that acts as the host for various demonstrations. The FTMF Expansion Card has hardware to support the following PSoC powered peripherals applications: CapSense Touch Button CapSense 7-Element Touch Slider CapSense Non-Touch / Proximity Detection Ambient light-level detection Thermistor-based temperature measurement The FTMF card also provides the following output devices: Red-Green-Blue triple LED cluster Audible magnet transducer or speaker, or both I2C digital communications Four unused A/D GPIO lines for user functions Demonstration Projects : Upon installing the Microsoft.net framework, PSoC Express 4.0, Express Expansion Pack 1, the following demonstration projects can be run : The the following input sensors are used : CapSense slider - Temperature sensor Ambient Light sensor CapSense proximity sensor 15

16 BASIC FEATURES OF THE PSOC EXPRESS SOFTWARE Steps in Desiging a System Illustrated using FirstTouch as Target Device 1. The Express consists of 4 design steps available in separate windows: a) Design b) Simulate c) Monitor d) BOM/Schematic 2. On the left, we have the Device Driver (Input) Selection Tree. This enables us to quickly select design elements and view project files in Application Editor. 3. We can select available input/output/valuator/interface devices by clicking on the link at the bottom of the device tree

17 Controls 2 LED colors based on a hand's proximity to proximity sensor. Rename Input Driver to CapSenseSlider Make number of sensor Pins = 7 Make SliderResolution = 99 (All other settings default) Every time a CapSense Element is used CSD Properties have to be included. This shows up automatically. Rename the second driver (shown as Input2 in this screenshot) as CSDProperties. 17

18 Now select output tab in the Device Selection tree. Navigate to Display LED Tri- Color Red/Green/Blue This output device is present on the FirstTouch Starter Kit and is therefore being used. We rename it to LED. We right click the LED Driver and select Transfer Function We select PriorityEncoder to make the conditional decisions. 18

19 Using the variable suggestions as determined by Express, the following conditions are added : We have to use Enter key to move to the else if condition The always true state 1 is added to ensure that we have the LED states off at intermediate or undetermined states. We navigate to the simulation tab and now verify that different values in the CapSenseSlider (0-100) give the state of LED s as originally expected. 19

20 Next we press F6 or goto Build Generate/Build from the main menu. A Screen as shown alongside appears where we select CY8C Pin Chip because this is the chip present on the FTMF Expansion Card. Default parameters for Supply Voltage, Sample Rate, Flash Interface and Reserved ROM Size are chosen. Assign Pins Automatically may be chosen. 20

21 Introduction to PSoC modules PSoC user modules (as used in Designer) have comprehensive data sheets which need to be referred before they are used in any project. This note merely mentions the highlights of the important modules to assist the first time user. Care has also been taken to ensure that text book/internet references have also been given wherever possible. Each module needs to have its start routine initialized after placement to work (with exceptions) o Some analog blocks require arguments in the start routine to work properly o Some digital blocks do not need to be initialized at all. All API functions for blocks in the project are placed by the software. A & X Registers are generally changed by API Calls. We may need to use PUSH & POP instructions to save the previous content of the registers (as usual!!) 21

22 basic module ADC (Analog to Digital Converter) PWM involves modification of the duty cycle of a signal or power source ADC s have to be placed in switched capacitor digital blocks only Please refer to Data Converters Chapter 10, Analog Electronics, L K Maheshwari and MMS Anand before continuing with the rest of this section. Suppose we want to convert an analog voltage range from V ss to V CC, the global parameters for the reference mux must be set to V CC VCC ± 2 2 The following type of ADC s are available for the designer o ADCINC12 o ADCINC14 o ADCINCVR o DELSIG8 o DELSIG11 o DUALADC o SAR6 o TRIADC ADCINC12 This configures a Switched Capacitor Block as an Integrator Input and Reference voltages are fed to the integrator alternately. A counter determines the number of times the integrator is high An 8 bit timer interrupts in 256 clock cycles to take the counter output. basic module pwm (Pulse Width Modulator) PWM involves modification of the duty cycle of a signal or power source Standard PWM uses square wave whose duty cycle is varied to manage the average value of the waveform PWM can be obtained by intersective, digital, delta and sigma-delta methods o Intersective Sawtooth/Triangular Wave generated by oscillator Wave in lighter colour is reference wave When (modulation waveform (sawtooth) < reference wave) Then (PWM Output=High) Otherwise (Low) 22

23 o Delta An analog signal is approximated in a series of segments Within a Reference This method is not used in PSoC In PSoC, PWM is generated using the digital method. It uses a counter (that increments periodically) Thus it needs to be somehow connected to the clock input It is reset at the end of every cycle of PWM Working: When (Counter value > Reference Value) Then (Output=High to low transition) 23

24 Timer Understanding Timer Parameteres: o Clock The clock parameter is selected from one of 15 sources. State changes occur on the rising edge of the clock source. o Capture A rising edge on this input causes the count register to be transferred to the compare register. The capture input allows us to capture the timer value at the event of this input changing states. o TerminalCountOut The terminal count output is an auxiliary counter output. It provides a single pulse on this output when the timer reaches its terminal count o CompareOut It outputs a low on the reloading of the counter from the period register, then changes to a high when the compare state becomes true. This output is available to the next higher digital block. One of the input options for digital blocks is to choose the output of the block immediately to its left. This option applies to the clock source of the timer. If another timer is in DBB1(place Timer16 and check), then one of the clock options for that timer would be DBB0. The clock for that timer could then come from the state of compare state of this timer regardless of whether we choose none or any of the other output options. Both timers would have to be started in order for the second timer to run correctly. This is how multibit asynchronous counters are designed (DECO) o Period This parameter sets the period of the timer. Allowed values are between 0 and 255. This value is loaded into the period register. The period is automatically reloaded when the counter reaches zero or the timer is enabled from the disabled state. This value may be modified using the API. Timer expires on (period value +1) i.e. when a carry condition is achieved o CompareValue Sets the count point in the timer period when a compare event is triggered. o CompareType Sets the compare function type to less than or less than or equal to. o InterruptType This parameter specifies whether the terminal count event or the compare event triggers the interrupt. o ClockSync Used to control clock skew and ensure proper operation when reading and writing PSoC block register values. o TC_PulseWidth Whether the terminal count output pulse is one clock cycle wide or one half clock cycle wide. o InvertEnable This parameter determines the sense of the enable input signal. Normal = enable input is active-high. Invert = enable input is active-low. 24

25 experiments level 0 lcd interfacing and applications 5. Plug in the USB Connector to the PSoC Mini- Programming Kit. For the first time a new driver installation will take place. 6. We place CY8C PXI in the dock Programming the PSoC is a 2 step process Develop the Code in PSoC Designer Download code to the device 3. Cypress Microsystems PSoC Designer 4. Choose New Project 5. Type Project Name 25

26 6. Incase correct part is not chosen, use View Catalog 7. Generate Main File using C 8. By default Assembler option is selected. In case the C Compiler option is disabled, please goto Tool Options Compiler and enter the ImageCraft Serial Number available in the Lab 9. The Characters after the hyphen indicate the part of packaging. 10 Notes : 1. Left pane shows preconfigured elements. They can be selected by highlighting the component Right Click Select 2. The resource meter on upper right side shows what part resources are used and available

27 11. To interface the LCD Module (LCM S01602DTR) from Lumex Systems, we first need to add a LCD Module from the Miscellaneous Digital Resources 12. Note the change in the resource meter characteristics on the right pane. 13. Switch from the user module view to the Interconnect view (Pin out of the LCD Module as in datasheet) 27

28 14. In User Module Parameters, select LCD_1. LCD Port Port_2 BarGraph Enable (In case the Bar Graph feature is not required, this can be disabled) 15. Scroll down in the pane below to see how the pin configuration has been automatically update it to the Oins used by the LCD Module. Port_2 is used because in CY3210-PSoC Eval1 Board, this is the default configuration for the J9 LCD connectors. Make sure the LCD module is now connected. Refer to the datasheet mentioned in the references to verify that the LCD module is connected to the right pins. On the CY3210-Eval1 Board, the LCD is connected to the J9 Connector The same data sheet should be used for similar projects. The right hand legend shows an image of the chip and what each colour of the pin represents. The middle view shows how the internal interconnects are configured and to which pins they are connected (In the screenshot nothing has been placed yet) To navigate the middle section use Ctrl + Click to Zoom In Use Shift + Ctrl + Click to Zoom Out Use Alt to navigate You must learn to be fast with these operations by practice 28

29 18. Shift to Application Editor Of the over 15 files created, we will only be modifying main.c It is important to ensure that LCD_1_<function name> is written since we have named our LCD module as LCD_1 Otherwise we will get errors which say undefined function #include <m8c.h> macros #include "PSoCAPI.h" User Modules void main() { char str[ ] = "User Module"; string LCD_1_Start(); hardware LCD_1_Position(0,4); row 0, col 4 LCD_1_PrCString("PsoC LCD"); "ROM" string LCD_1_Position(1,2); row 1, col 2 LCD_1_PrString(str); string. // part specific constants and // PSoC API definitions for all // Define "RAM" based // Initialize LCD // Position // Print a constant // Position // Print "RAM" based } 29

30 Resources Used : 1. Cypress Semiconductor: User Module Data Sheet LCD Tool Box: 2. Design Aids - CY3210 PSoCEval1 and MiniEval1 Development Board Example Projects - AN2011 Search on Cypress Website Design Aids Section for CY Purdy Electronics: AND721GST-LEDdatasheet: 4. Purdy Electronics: Intelligent Alphanumeric Application Notes: Further Experiments: 1. Perform the functions shown in this video using the PSoC and LCD

31 experiments level 1 LED BLINKING Blink an LED at a rate of 0.5 Hz This experiment uses a timer to make LED s blink at 0.5 Hz. Every time the timer counts down to 0, control passes to the Timer_Interrupt_Service_Routine. A single line code in the ISR XORs the state of Pin 2 with x0001 which makes it effectively an inverter. The timer is set on an infinite loop. So the blinking is perpetual. The timer count being used here makes it generate interrupts once every 2 seconds. 7. Plug in the USB Connector to the PSoC Mini-Programming Kit. For the first time a new driver installation will take place. 8. We place CY8C PXI in the dock Programming the PSoC is a 2 step process Develop the Code in PSoC Designer Download code to the device 3. Cypress Microsystems PSoC Designer 4. Choose New Project 5. Type Project Name 31

32 6. Incase correct part is not chosen, use View Catalog 7. Generate Main File using C 8. By default Assembler option is selected. In case the C Compiler option is disabled, please goto Tool Options Compiler and enter the ImageCraft Serial Number available in the Lab 9. The Characters after the hyphen indicate the part of packaging. 10 Notes : 3. Left pane shows preconfigured elements. They can be selected by highlighting the component Right Click Select 4. The resource meter on upper right side shows what part resources are used and available

33 11. We will add an eight bit timer Timer8_1 12. Note the change in the resource meter characteristics on the right pane. 13. Switch from the user module view to the Interconnect view The right hand legend shows an image of the chip and what each colour of the pin represents. The middle view shows how the internal interconnects are configured and to which pins they are connected (In the screenshot nothing has been placed yet) To navigate the middle section use Ctrl + Click to Zoom In Use Shift + Ctrl + Click to Zoom Out Use Alt to navigate 33

34 You must learn to be fast with these operations by practice 14. Global Resources Settings 32K_Select and PLL_Mode at Internal and Disable We are not using an external crystal to drive the processor nor need anything to sync it to. CPU_Clock=SysClock/2 (=12MHz) VC1=16 VC2=16 Effectively VC1=24MHz/16=1.5MHz (Note this is not CPUClock) And VC2=1.5MHz/16=100KHz VC3 Source = VC2 VC3 Divider=256 So VC3=366Hz 15. The Time8_1 is placed on DBB0 (Right Click Place Part) 16. User Module Parameteres If not defined now, PSoC Designer will shorten the initialization section. This is advantageous in some cases Clock = VC3 (=366 Hz) Capture = Low (If selected, will allow capture of the timer value. We don t need it here) TerminalCountOut = Row_0_Output_3 CompareOut = None Period = 182 Compare Value = 0 Compare Type = Less Than Interrupt Type = Terminal Count Clock Sync = Sync To SysClk TC Pulse Width = Full Clock Invert Capture = Normal (Note the change around the DBB0 block) 17. As a matter of procedure, we should perform a Design Rule Check from the tools menu. Since we have not explicitly placed parts, it is not required here, but this step should be followed for all experiments, even if it is not explicitly mentioned. 18. Shift to Application Editor 34

35 19. In application editor, Press F7 or Build Build All from the menu This step generates all the files associated with the user module we have selected and update header files and libraries as well. In the left top pane, observe all the files created and make a note. With more components added, more files will be created. 20. Optional Observation only Open boot.asm The file boot.asm is where the chip will start executing code on power-up. Observe the lines as mentioned in the right pane. This instructs jump to the Interrupt Service Routine of the timer org 20h ;PSoC Block DBB00 Interrupt Vector ljmp _Timer8_1_ISR reti The files timer8_1.asm and timer8_1int.asm are associated with this timer. The timer8_1.asm includes the routines associated with starting, stopping, and configuring the timer operation. The file timer8_1int.asm contains the interrupt service routine for the timer. The globalparams.inc and globalparams.h files contain equate statements associated with the resources of the PSoC micro in general The psocapi.inc and psocapi.h files are generated for convenience. They will include all of the module include files in a project, so that we won t have to include them individually m8c.inc contains often used macros flashsecurity.txt file allows us to set the security of each block of Flash on the PSoC Default - protected. 21 Type the following code in main.c #include <m8c.h> // part specific constants and macros #include "PSoCAPI.h"// PSoC API definitions for all User Modules // C Interrupt Handlers #pragma interrupt_handler Timer8_1_ISR_C void main() 35

36 { } //Enable the Global Interrupt M8C_EnableGInt; //Enable the Timer interrupt and Start the UM Timer8_1_EnableInt(); Timer8_1_Start(); //infinte loop. Processing done only at Timer_ISR. while(1); 22. Build 23 Press Program Part on the right // FUNCTION NAME: Timer8_1_ISR_C // Interrupt Service routine of Timer8_1 usermodule written in C. void Timer8_1_ISR_C() { //Read Port2 and XOR it with 0x01 to change the status from On to Off and vice-versa. PRT2DR ^= 0x01; } 24. Select MINIProg1 in Port and connect 25. Select Program 26. Make sure you check power device icon after Programming Successed is displayed 27. Make sure Port2[3] is connected to an LED!! Modifications/Exericse : 1. The blink rate is very fast. So, the intensity will appear very low. Modify the program to make perceptible blink rate of the LEDs 2. Make multiple LEDs blink at variable rates. Same Timer may be used. 3. Make a potentiometer controlled variable blink LED rate system. That is when Potentiometer is turned in either direction, the blink rate of the LEDs must vary. a. The potentiometer voltage output fed to a pin b. ADC used to convert that into a digital equivalent 36

37 c. Make a Lookup Table which will convert it into different period values for the various digital value ranges in b d. Change the Period value in the LED in the C Code Dynamically e. Other settings remain the same. 4. Use a Pulse Width Modulator to get pulses of a certain width on a PSoC Pin. Connect this Pin externally to an LED on the board you are using. Additional Comments In case we decide to make changes in boot.asm like defining extra interrupts, they will be lost as the boot.asm is regenerated every time we build application Changes if any can be done in boot.tpl. This will ensure that changes are reflected in the main boot.asm file every time the file is regenerated. Otherwise, we have to redo the changes every time a new boot.asm is generated. 37

38 experiments level 2 SIGNAL GENERATION Generate a fixed frequency Sine Wave Theoretical Analysis (AN 2086) The fourier series of a square wave is given by : w(t)= a 0 + a n cosnw0t + bn sin nw0t 1 i.e a 0 = T a n = T b n = T n= 1 0 T0 0 / 4 2 T 0 T0 / 4 0 / 4 2 T 0 T0 / 4 So, w(t) = Assuming ω 0 =1 + 0 / 4 1 T w( t) dt = dt =1/2 T 0 T0 / 4 2 nπ cosnω 0tdt = sin nπ 2 sin nω tdt = cosωot cos3ω 0t + cos5ω 0t cos7ω0t + cos9ω 0t π t = 0:.1:10; y = 1/2+(2/pi)*(cos(t)); plot(t,y); t = 0:.1:10; y = 1/2+(2/pi)*(cos(t) -(1/3)*cos(3*t)); plot(t,y); t = 0:.1:10; y = 1/2+(2/pi)*(cos(t) - (1/3)*cos(3*t)+(1/5)*cos(5*t)); plot(t,y); t = 0:.1:10; y = 1/2+(2/pi)*(cos(t) - (1/3)*cos(3*t)+(1/5)*cos(5*t)); plot(t,y); 38

39 1 The building of a square wave: Gibbs' effect MATLAB Code (For Verification) t = 0:.02:3.14; y = zeros(10,length(t)); x = zeros(size(t)); for k=1:2:19 x = x + sin(k*t)/k; y((k+1)/2,:) = x; end plot(y(1:2:9,:)') title('the building of a square wave: Gibbs'' effect') Assuming w(t) = cosωot cos3ω 0t + cos5ω 0t cos7ω0t + cos9ω 0t π And ω 0 =2πf, Let us assume f=1 unit = 1 Khz (say) So, w(t) = cos2πt cos3πt + cos5πt cos7πt + cos9πt.. + π To generate a sine wave from a given square wave, we need to pass this through a Band Pass Filter The following simplification (based on AN2086) has the following features: 1. Use the BPF2 User module datasheet to determine the filter parameters such that: Center frequency = 1Khz Q=4 Oversampling Rate = Two BPF2 filters are used to obtain accuracy 3. An 8 bit counter used to obtain a square wave of 1Khz frequency 4. For demonstration purpose, we are also using a 16 bit counter (fed at 24 Mhz) to implement a divide by 200. This generates the clock input for the programmable gain amplifier 5. Output of Counter8_1 fed to pin P0[0] 6. This is externally connected (Explore advantages and disadvantages of internal connection if possible) to the input of a programmable gain amplifier (PGA) in the analog module section 7. To avoid saturation of the output sine wave, gain of PGA set to 0.75 (Examine practical limits of PGA gain when the final output becomes unidentifiable). Note that saturation of the square wave is meaningless because after clipping this would still be square. 8. The Sine wave output is finally obtained at P0[5] 39

40 9. Plug in the USB Connector to the PSoC Mini-Programming Kit. For the first time a new driver installation will take place. 10. We place CY8C PXI in the dock Programming the PSoC is a 2 step process Develop the Code in PSoC Designer Download code to the device 3. Cypress Microsystems PSoC Designer 4. Choose New Project 5. Type Project Name 6. Incase correct part is not chosen, use View Catalog 7. Generate Main File using C 8. By default Assembler option is selected. In case the C Compiler option is disabled, please goto Tool Options Compiler and enter the ImageCraft Serial Number available in the Lab 9. The Characters after the hyphen indicate the part of packaging

41 Notes : 5. Left pane shows preconfigured elements. They can be selected by highlighting the component Right Click Select 6. The resource meter on upper right side shows what part resources are used and available 11. The following modules are placed : Filters BPF2_1 & BPF2_2 Counters Counter16_1 Counters Counter8_1 & Counter8_2 41

42 Amplifiers PGA_1 12. Switch from the user module view to the Interconnect view Use standard procedure to place all blocks in the design. The following is a quick revision of the steps 13. Click on the clock input of the 16 bit counter. Select VC1 as shown. This makes it get a clock signal of SysClk=24 Mhz. You can use VC3 to do this if you only need 8 bit divider. This will keep the digital block free for other things. 14. We will give the LSB of the 16 bit counter (divide by 8) as clock to the PGA. Scroll down to AnalogClock_0_Select and select DBB00 (where the LSB section of the 16 bit counter is placed). 42

43 Note : If dividing by less than 256, then we can use an 8-bit counter. By using an 8-bit you will save digital blocks for other things. Now select AnalogColumn_Clock_0 and select AnalogClock_0_Select. This effectively connects the output of the LSB of the 16 bit counter to the clock input of the Programmable Gain Amplifier. Once the default experiment is over, one could try connecting the MSB of the 16 bit counter (here connected to AnalogColumn_Clock_1) and give it as clock input to the Programmable Gain Amplifier. Note the change in the outputs. Scroll up again to the first 8 Bit Counter (Counter8_1) This is the counter which actually is being used here to generate the square wave of 4 Khz frequency (32 Khz/4) Select CPU_32_Khz as the clock input. Other options might be tried once the basic experiment is over. Note : The 32 khz clock is not very accurate, so maybe it is not a good choice. The accuracy of the CPU_32kHz clock is from 15kHz to 64kHz. So, the 4 khz could be anywhere from 2kHz to 8 khz. I suggest dividing down VC1 and VC2 by the max (16 43

44 each) which would give you kHz. This could be divided in the Counter8 to get 4kHz (or whatever is wanted). Connect the CompareOut to RO0[0]. Then to Global Out Even (GOE) 0 and then to Port_0_0. Other ports might be used. I have used this for convenience of the external connections which I propose to use. Remember to connect Port_0_0 to Port_0_1 because this is what I am assuming from the next step onwards. That is the square wave generated will be available at Port_0_1 now. Note: You can connect the digital output to Port0.0 and route that into the analog input. The analog connection is independent of the digital connection, so both can be connected to the same 13. Scroll down to the AnalogColumns_InputMux0 and select Port_0_1. This means Port_0_1 is now to be selected by PSoC Designer when configuring the blocks 44

45 14. Now select AnalogColumns_InputMux0 as the Input to the PGA block. This effectively makes the input at Port_0_1 of the PSoC available as input One can also connect the AnalogBus to AnalogOutBus_0. This can be then connected to a Pin as shown below. This step is only for verification purposes. 45

46 15. Once we get a suitable analog value from the PGA, we need to feed it to the BPF. For the first iteration, one may use the part placement as shown in the figure shown next other alternatives have their own problems. 16. Click on the input of BPF2_1 FLIN Module and select ACB00 (it might be something different if you placed it differently) Te opposite connection that is from PGA to BPF2_1 is not generally used (or possible!!) Note : The way to set analog connections is by selecting which source is used for each input. Where the output goes cannot be set. This is just the way that PSoC Designer was made to work. You have to use this method to know obtain the square wave input signal to the first Band Pass Filter 46

47 17. Click on the Input of BPF2_2 module and select ASC10 (again this name might be different if your placement has been done differently). But make sure that you connect from the BPF2_1 FLIN module. 18. To obtain the final output (now a sine wave) connect the AnalogBus of the BPF2_2 to the AnalogOutBus_1 19. You will notice that this is fed to buf1. Click on this to connect to Port0_5. Now the output can be sampled from Pin2 (Port0[5]) of the PSoC 47

48 20. Global Resources Settings 32K_Select and PLL_Mode at Internal and Disable We are not using an external crystal to drive the processor nor need anything to sync it to. CPU_Clock=SysClock/8 (=3MHz) VC1=1 (We don t need this) VC2=1 VC3 Source = SysClk/1 (Default) VC3 Divider=1 Every other parameter default Notes : The "best" speed to set the CPU for experimental use is 12MHz. That is the maximum speed over the full voltage range (using 24MHz requires >4.75V). If projects require minimum power, they can have their CPU speed reduced after it gets working. (All Default) Jeff recommends using VC1, VC2 or VC3 as the source for the clock for the square wave instead of the 32k Clock. Generally, when clocks are not being used, they should be set to the lowest frequency (e.g. VC1 = 16, VC2 = 16, VC3 Source = VC2, VC3 = 256). This will use the least power. 48

49 21. Refer to the Band Pass Filter Design Utility. The following parameters can be used. Note : The Wizard does not currently work properly. Cypress plans on having it fixed in a future release. 22. The following parameters for the Programmable Gain Amplifier should be used. For secondary testing, the gain can be varied here and experimented Notes : This is prior to the filter, so only setting gains <1 should have an effect. Another option would be to change the gain in the Filter. You can have PGA <1 (like suggested above) and then change the gain of the BPF itself to see the effect on amplitude. The gain on the BPF is negative (not obvious with a sine wave output). 49

50 23. The User Module Parameters shown alongside for the 8 bit counter should be used. One can experiment with different values once the primary result has been obtained. Counter8_2 is to show how broadcast buses (BC0) here can be used to take the output of one module can be fed to another. This was actually used in AN 2086 to provide control of the frequency of the sine wave generated using a digital encoder. For more information, refer the appendix. 21. Shift to Application Editor 22. In application editor, Press F7 or Build Build All from the menu This step generates all the files associated with the user module we have selected and update header files and libraries as well. In the left top pane, observe all the files created and make a note. With more components added, more files will be created. 21 Type the following code in ; Assembly main line 50

51 main.asm 22. Build 23 Press Program Part on the right include "m8c.inc" ; part specific constants and macros include "memory.inc" ; Constants & macros for SMM/LMM and Compiler include "PSoCAPI.inc" ; PSoC API definitions for all User Modules export _main export flags, ticker, period area bss (ram) ;inform assembler of variables to follow area text (ROM, REL) _main: M8C_EnableGInt call Counter16_1_Start call Counter8_1_Start call Counter8_2_Start ;Turn on Ticker call Counter8_2_EnableInt mov a,3;bpowersetting to HighPower Mode. Refer Datasheet call BPF2_1_Start mov a,3;bpowersetting to HighPower Mode. Refer Datasheet call BPF2_2_Start mov a,3 call PGA_1_Start ;Turn on buffer.terminate: jmp.terminate 24. Select MINIProg1 in Port and connect 25. Select Program 26. Make sure you check power device icon after Programming Successed is displayed 27. Make sure Port0[5] is connected to a CRO!! 51

52 Modifications/Exericse : 5. Connect the output of BPF2_1 FLIN module to the analog bus, then via the buffer to a pin of your choice. Observe the difference if any between the outputs of the two Band Pass Filters. This will enable us to understand why at all two BPF Filters should be used. 6. Try giving the output of the 8 bit counter directly to the Band Pass Filter (Internally and externally both). You will notice that the input may also be given through a buffer amplifier. Try changing the gain of the buffer or PGA (to 1, then to higher values) and observe the changes in the sine wave output waveforms. 7. Perform the application mentioned in AN2086. In case a digital encoder is not available, use a microprocessor or another PSoC to generate the output waveforms mentioned in the Application Note. 8. An important thing to do is to add an R-C LPF on the output. O /\/\/\-----o output Gnd The purpose of this filter is to remove the sample clock from the SC block. Its pole should be set between the pass frequency of the BPF and the frequency of the SC blocks. The pole for the RC must be higher than the BPF frequency but has to be low enough so that the SC clock is removed sufficiently. Look in the spreadsheet to see what the oversample frequency of the BPF is. This will give an idea of the limits for the RC LPF. Review of this Experiment : 1. Note : Items in italics refer to suggestions on this experiment by Jeff Dahlin, Principal Applications Engineer, Cypress Semiconductors, San Jose. He may be reached for concrete doubts on jvy@cypress.com. Please first use the Developer Forums at psocdeveloper.com for queries before contacting Jeff. 2. This experiment has been reviewed by Jeff Dahlin, PAE, Cypress Semiconductors. 52

53 53

54 54

55 55

56 56

57 57

58 experiments level 2 MANCHESTER CODE GENERATION Constructing A Manchester Encoder Theoretical Analysis (AN 2281) Also refer Analog & Digital Communication Systems B P Lathi, 3 rd Edition Text Book for EEE GC 383 Manchester encoding is a form of digital encoding where bits are represented by transitions from one logical state to another. We can use SPIM User Module and LUT features and certain API functions to carry out encoding a single byte or a string of bytes. Some of the necessary features in line coding (Sec 7.2) are : o Small Transmission Bandwidth (B T ) o Adequate Timing Content possible to extract clock from signal o Transparency - long number of 0 s may cause error in timing extraction o Error Detection and Correction Capability Bipolar codes make it possible to detect violations o Favourable Power Spectral Density - PSD = 0 at ω=0 P( ω) Assume a pulse p(t), its PSD, = + S y ( ω) R0 2 Rn cosnωtb Tb n= 1 Its Fourier Transform is P(ω). Since this contains the factor, P(ω) is zero at dc (ω=0) Given that P ) jωt = p( t e dt 2 1 where transmission rate is R b = pulses per second. T b 2 P (ω), we can force the PSD to have DC null by selecting p(t) such that j0t ( ω ), we have P( 0) = p( t) e dt i.e. P ( 0) = p( t) dt If we make the area under p(t) zero P(0) =0. For a rectangular pulse, one way of doing it is using split phase (twinned-binary) signal. Using S y ( ω ) = P( ω) T b 2, we can claim that Manchester line code has dc null. In Manchester encoding, logic high is represented by a high-to-low transition at mid clock and logic low is represented by a low-tohigh transition at mid clock. Please refer Figure 7.6 (Page 304) in B P Lathi for thorough understanding. AN 2281 performs Manchester Encoding using Serial Peripheral Interface (SPI) and Lookup Table (LUT) Features available in the Row_Output nets. We use the SPI in Mode 0 (i.e CPOL and CPHA=0, refer to explanation at beginning of this manual). Data is read on the clock's rising edge & Data written on the clock s falling edge. Encoder SPIM when placed should have MISO = 0, MOSI and Clock are given to two Row outputs. The LUT is then configured to perform MOSI XOR CLK. Typical SPI Configuration 58

59 Block Diagram for Manchester Encoder We may observe that an Exclusive OR operation over serial input (in Master Out Serial In - MOSI ) and the clock produces the desired Manchester Coded output (shown in LUT Output). This simplification should be tried out for different test cases of output. One such case as in the original application note is shown above. To generate the Manchester code of given data, we need to pass this through a Band Pass Filter 9. We have to configure the Clock, Period, and CompareValue parameters as per the desired Manchester data rate. The output of Counter8 block should be twice the desired data rate. 10. We have to code so that the SPI Master Module sends say 16 bits encodes this and sends the result on a given pin. 11. Plug in the USB Connector to the PSoC Mini-Programming Kit. For the first time a new driver installation will take place. 12. We place CY8C PXI in the dock Programming the PSoC is a 2 step process Develop the Code in PSoC Designer Download code to the device 3. Cypress Microsystems PSoC Designer 4. Choose New Project 59

60 5. Type Project Name 6. Incase correct part is not chosen, use View Catalog 7. Generate Main File using C 8. By default Assembler option is selected. In case the C Compiler option is disabled, please goto Tool Options Compiler and enter the ImageCraft Serial Number available in the Lab 9. The Characters after the hyphen indicate the part of packaging The following modules are placed : SPIM Encoder 60

61 Counter8 Clock Notes : 7. Left pane shows preconfigured elements. They can be selected by highlighting the component Right Click Select 8. The resource meter on upper right side shows what part resources are used and available 12. Switch from the user module view to the Interconnect view 13. Global Resources Settings CPU_Clock=SysClock/1 (=24MHz) VC1=16 VC2=8 VC3 Source = SysClk/1 VC3 Divider=1 Other settings are as shown Here VC1 becomes 24/16 =1.5 MHz

62 15. For the user module parameters of the 8 bit Counter, the following is used : Clock: VC1 Enable: High ClockSync: Sync to SysClk CompareOut: None TerminalCountOut: None Period: 50 (As per data rate required) CompareValue: 25 CompareType: Less Than InterruptType: Terminal Count InvertEnable: Normal 16. Assuming the clock is placed on DBB01, click on the clock source (top left arrow) and a screen as shown alongside appears. Here we set the clock to VC1=1.5Mhz 62

63 17. Again assuming that SPIM (Encoder) was placed DCB02, click on its clock and select DBB01 this effectively routes the LSB of the 8 Bit Counter as clock source for the SPI Master. 18. Click on MOSI (Master Output) and select routing to Row_0_Output_0. Similarly select SClk and route it to Row_0_Output_1 We can click on MISO and select Low effectively driving it to the common ground. Clock Sync is selected as per clock source (to synchronize with SysClock) The same configuration can be done by the values in the User Module Parameters as shown in the circled region. 63

64 19. Click on the Logical Operation Icon at the end of RO0[0]. Clicking on this produces an option table to map various outputs to Global Output Even and Global Output Odd Lines through logical operations 2 Now, click on the icon as shown by This produces various digital operations that can be performed with the two selected row inputs RO0[0] and RO0[1] i.e. MOSI and SClk respectively. As described in the conceptual description above a XOR operation produces the desired output. 21. We now select Row_0_Output_0_Drive_0 as shown and map this LUT output to appear on GlobalOutEven_0 bus. 64

65 22. Similarly selecting Row_0_Output_1, we can connect the Digital Interconnect Row_0_Output_1 to map into GlobalOut_Even_1 23. Finally GOE0 (which is MOSI) is mapped to Port_2_0 And GOE1 (which is SClk) is mapped to Port_2_1 Both the outputs are mapped so that they can be easily observed on a CRO and the theoretical results as described above can be compared. With these steps, most of the system component placement and routing is complete. 24. Shift to Application Editor 25. In application editor, Press F7 or Build Build All from the menu This step generates all the files associated with the user module we have selected and update header files and libraries as well. In the left top pane, observe all the files created and make a note. With more components added, more files will be created. 65

66 We have to Add Manchester_Encoder.asm and Manchester_Encoder.h to the project. 2. In main.c (or main.asm), we call the SetupEncoder function to initialize the Manchester Encoder. 3. After initialization, use the SendByte or SendString function to perform Manchester encoding. The code with the step by step explanation of each line is shown below. 27. Type the following code in main.c // // C main line // #include <m8c.h> // part specific constants and macros #include "PSoCAPI.h" // PSoC API definitions for all User Modules #include "Manchester_Encoder.h" BYTE TxString[16]; //defines a BYTE Array of size 16 void main() { char x; // Fill the Tx Buffer for(x=0; x<16; x++) { TxString[x] = x; } // Initialize the Manchester Encoder SetupEncoder(); while(1) { // Encode and Send the TxBuffer EncodeArray(TxString, 16); 28. This is the program description for manchester_encoder.asm This defines certain functions which were used in the main.c. program. // Send values 0 to 15 inside a for loop using EncodeByte function for (x=0; x<16; x++) { EncodeByte(x); } } } //This program effectively makes the encoder code the manchester equivalent of decimal numbers 0 to 15. Include "m8c.inc" include "psocapi.inc" include "psocgpioint.inc" export _SetupEncoder export SetupEncoder 66

67 The program contents are based on the datasheet of SPIM. call Encoder_SendTxData makes a function call to a predefined function in encoder.h which is added to the library headers by default. (we have to rename it to encoder otherwise the default name will come in) export _EncodeByte export EncodeByte export _EncodeArray export EncodeArray area bss(ram) Pointer: BLK 1 DataCount: BLK 1 area text(rom) ; ; FUNCTION NAME: SetupEncoder ; ; DESCRIPTION: ; Sets up and starts the resources for the Manchester encoder ; ; ARGUMENTS: None ; RETURNS: None ; SIDE EFFECTS: None ; PROCEDURE: The following operations are performed ; 1. The bit corresponding to DATA out pin in the PRTxDR register ;is set to 0 ; 2. The DATA pin is disconnected from global bus so that the level ;is LOW ; 3. The SPIM user module is started at Mode0 and MSB_FIRST ; 4. The Counter that provides the SPIM Clock is started ; 5. A dummy byte is sent over SPIM to bring the MISO state which ;is connected to LOW to MOSI output. This is the idle level of MOSI ;output ; 6. The DATA pin is connected to Global bus thus connecting the ;output of the LUT to the DATA pin ; _SetupEncoder: SetupEncoder: ; Clear the DATA bit in the PRTxDR register and reg[data_data_addr],~data_mask ; Disconnect the DATA pin from Global bus and reg[data_globalselect_addr],~data_mask ; Start the SPIM with Mode0 and MSB First shifting mov A,(Encoder_SPIM_MSB_FIRST Encoder_SPIM_MODE_0) call Encoder_Start ; Start the SPIM clock call Clock_Start ; Send a dummy byte to setup the MOSI level to HIGH mov A,0xFF call Encoder_SendTxData ; Wait till the Transmission is complete WaitLoop: call Encoder_bReadStatus and A,Encoder_SPIM_SPI_COMPLETE jz WaitLoop ; Connect the DATA pin to Global bus or reg[data_globalselect_addr],data_mask ret ; ; FUNCTION NAME: EncodeByte ; DESCRIPTION: ; Encodes and sends a single byte of Data ; ; ARGUMENTS: A -> Byte to be encoded and sent ; RETURNS: None ; SIDE EFFECTS: None 67

68 ; _EncodeByte: EncodeByte: ; Save the data in Accumulator to stack push A WaitTillTxBufferEmpty: ; Check if Tx buffer is empty before writing data call Encoder_bReadStatus and A,Encoder_SPIM_TX_BUFFER_EMPTY jz WaitTillTxBufferEmpty ; Restore the data from stack to Acc pop A ; Call the SendTxData function call Encoder_SendTxData ret ; ; FUNCTION NAME: EncodeArray ; DESCRIPTION: ; Encodes and sends a single bit of Data ; ; ; ARGUMENTS: ; [SP-3] -> Pointer LSB to the Source Buffer ; [SP-4] -> Pointer MSB to the Source Buffer ; [SP-5] -> Data Count ; RETURNS: None ; SIDE EFFECTS: None ; _EncodeArray: EncodeArray: mov X,SP mov A,[X-5] mov [DataCount],A mov A,[X-3] mov [Pointer],A EncodeNextByte: call Encoder_bReadStatus and A,Encoder_SPIM_TX_BUFFER_EMPTY jz EncodeNextByte mvi A,[Pointer] call Encoder_SendTxData dec [DataCount] jnz EncodeNextByte ret 29. Include Manchester_encoder.h in the source files section #pragma fastcall16 SetupEncoder; #pragma fastcall16 EncodeByte; #pragma fastcall16 EncodeArray; extern void SetupEncoder(void); extern void EncodeByte(BYTE DataByte); extern void EncodeArray(BYTE *SourceBuffer, BYTE DataCount); 68

69 30. Build 31. Press Program Part on the right 32. Select MINIProg1 in Port and connect 33. Select Program 34. Make sure you check power device icon after Programming Successed is displayed 35. Make sure 20 Port2[0] MOSI and 8 Port2[1] SClk are connected to the two channels of a CRO. A result similar to the one shown below will be obtained. Modifications/Exericse (From AN2281): 1. The project API function for sending a string is actually a blocking function. It waits until all of the data is transmitted and then it exits. If the user prefers to send data in the background only?? a. Enable the SPIM interrupt. b. Set the interrupt mode to TxRegEmpty. c. Inside the ISR, increment the pointer and load the Tx buffer with the subsequent data. d. Verify that all data was sent. If all data was sent, a flag can be set by the ISR to indicate completion of the process (this is for the main function to check). 69

70 2. The SetupEncoder function initializes the SPIM in MSB_FIRST mode. If the application requires that the LSB be transmitted first, then modify the code in the SetupEncoder function as shown below: mov A,(Encoder_SPIM_MSB_FIRST Encoder_SPIM_MODE_0) call Encoder_Start Review of this Experiment : 1. This experiment is based on AN 2281 as attached in this appendix by M. Ganesh Raaja, Applications Engineer the first PSoC Master. He can be reached best through psocdeveloper.com forums. 70

71 APPENDIX 71

72 72

73 73

74 74

75 75

76 76

77 77

78 78

PSoC Designer Quick Start Guide

PSoC Designer Quick Start Guide Installation PSoC Designer Quick Start Guide PSoC Designer is available for download at http://www.cypress.com/go/designer. You can also download an ISO image to create an installation CD. Each Starter

More information

Instructions for Tele-Training

Instructions for Tele-Training Instructions for Tele-Training Prior to the start of the class: Download the latest PSoC Designer software at http://www.cypress.com/support/link.cfm?sd=4. If you have a PSoC ICE, connect it to your computer.

More information

1. What is ProSpeckz IIK?

1. What is ProSpeckz IIK? 1. What is ProSpeckz IIK? ProSpeckz IIK (Programmable Speck using Zigbee radio) is the second generation prototyping platform that is designed and developed by Steven Wong at the University of Edinburgh

More information

PSoC Designer: Integrated Development Environment

PSoC Designer: Integrated Development Environment PSoC Designer: Integrated Development Environment Getting Started 25-Minute Tutorial Revision 1.0 CMS10006A Last Revised: July 3, 2001 Cypress MicroSystems, Inc. 1 Overview This tutorial of PSoC Designer:

More information

CE58957 demonstrates how to implement the fade and toggle feature to the backlight LEDs of CapSense buttons.

CE58957 demonstrates how to implement the fade and toggle feature to the backlight LEDs of CapSense buttons. Objective CapSense Sigma Delta (CSD) with LED Backlight Fading on CY8C24x94 CE58957 Code Example Name: Example_CSD_BacklightFading_24x94 Programming Language: C Associated Part Families: CY8C24x94 Software

More information

PSoC 1 Evaluation Kit Guide

PSoC 1 Evaluation Kit Guide CY3210-PSoCEVAL1 PSoC 1 Evaluation Kit Guide Doc. #: 001-66768 Rev. *D Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): 408.943.2600 http://www.cypress.com

More information

Application Note. Multifunction Data Logger

Application Note. Multifunction Data Logger Application Note AN2xxx Multifunction Data Logger Author: Tsogjavkhlan Tumurbaatar Associated Project: Yes Associated Part Family: CY8C27xxx PSoC Designer Version: 4.00 Summary This project shows how to

More information

For one or more fully configured, functional example projects that use this user module go to

For one or more fully configured, functional example projects that use this user module go to Datasheet Timer16 V 2.6 001-13622 Rev. *I 16-Bit Timer Copyright 2000-2012 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog SC Flash

More information

32-Bit Counter Datasheet Counter32 V 2.5. Features and Overview

32-Bit Counter Datasheet Counter32 V 2.5. Features and Overview Datasheet Counter32 V 2.5 001-13265 Rev. *J 32-Bit Counter Copyright 2002-2012 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog

More information

PSoC. The Programmable System-On-Chip. Empower Your Product

PSoC. The Programmable System-On-Chip. Empower Your Product PSoC. The Programmable System-On-Chip. Empower Your Product Cypress s revolutionary Programmable System-On-Chip (PSoC ) mixed-signal array is a complete system-level solution with configurable digital

More information

DEV-1 HamStack Development Board

DEV-1 HamStack Development Board Sierra Radio Systems DEV-1 HamStack Development Board Reference Manual Version 1.0 Contents Introduction Hardware Compiler overview Program structure Code examples Sample projects For more information,

More information

Incremental ADC Data Sheet

Incremental ADC Data Sheet 4. Incremental ADC Incremental ADC Data Sheet Copyright 2008-2009 Cypress Semiconductor Corporation. All Rights Reserved. ADCINC PSoC Resources Blocks API Memory Pins (per CapSense I2C/SPI Timer Comparator

More information

PSoC 1 I 2 C Bootloader

PSoC 1 I 2 C Bootloader Objective Project Name: PSoC1_I2C_Bootloader Programming Language: C Associated Part: All PSoC 1 Families Software Version: PD 5.2 SP1 Related Hardware: CY3210 PSoC Eval1 Board Author: Jie Yuan This project

More information

DMX512 Receiver Datasheet DMX512Rx V 1.0. Features and Overview

DMX512 Receiver Datasheet DMX512Rx V 1.0. Features and Overview Datasheet DMX512Rx V 1.0 001-14404 Rev. *G DMX512 Receiver Copyright 2007-2014 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog

More information

Preliminary. Gas Sensor Analog Front End Datasheet GasSensorAFE V Features and Overview. This datasheet contains Preliminary information.

Preliminary. Gas Sensor Analog Front End Datasheet GasSensorAFE V Features and Overview. This datasheet contains Preliminary information. Preliminary Gas Sensor Analog Front End Datasheet GasSensorAFE V 1.10 001-81375 Rev. *A GasSensorAFE Copyright 2012-2013 Cypress Semiconductor Corporation. All Rights Reserved. This datasheet contains

More information

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform. Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,

More information

PSoC Blocks. CY8C20xx6/6A/6AS/6H/6L, CY8C20xx7/7S, CY7C643xx, CY7C604xx, CYONS2xxx, CYONSxNxxxx, CYRF89x35, CY8C20065, CY8C24x93, CY7C69xxx

PSoC Blocks. CY8C20xx6/6A/6AS/6H/6L, CY8C20xx7/7S, CY7C643xx, CY7C604xx, CYONS2xxx, CYONSxNxxxx, CYRF89x35, CY8C20065, CY8C24x93, CY7C69xxx Datasheet ADCINC V 3.00 001-45836 Rev. *H Incremental ADC Copyright 2008-2013 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) CapSense I2C/SPI Timer Comparator

More information

16-Bit Hardware Density Modulated PWM Data Sheet

16-Bit Hardware Density Modulated PWM Data Sheet 1. 16-Bit Hardware Density Modulated PWM User Module Data Sheet 16-Bit Hardware Density Modulated PWM Data Sheet DMM16HW DMM16HW Copyright 2009 Cypress Semiconductor Corporation. All Rights Reserved. PSoC

More information

For one or more fully configured, functional example projects that use this user module go to

For one or more fully configured, functional example projects that use this user module go to Datasheet TX8 V 3.50 001-13621 Rev. *K 8-Bit Serial Transmitter Copyright 2001-2015 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Pins (per External I/O

More information

Programmable Gain Amplifier Datasheet PGA V 3.2. Features and Overview

Programmable Gain Amplifier Datasheet PGA V 3.2. Features and Overview Datasheet PGA V 3.2 001-13575 Rev. *I Programmable Gain Amplifier Copyright 2002-2014 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT

More information

CapSense I 2 C/SPI Timer Flash RAM

CapSense I 2 C/SPI Timer Flash RAM Datasheet SPIS V 2.5 001-13679 Rev. *K SPI Slave Copyright 2002-2015 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) CapSense I 2 C/SPI Timer Flash RAM

More information

University Program Advance Material

University Program Advance Material University Program Advance Material Advance Material Modules Introduction ti to C8051F360 Analog Performance Measurement (ADC and DAC) Detailed overview of system variances, parameters (offset, gain, linearity)

More information

The following table lists user modules used in this code example and the hardware resources occupied by each user module.

The following table lists user modules used in this code example and the hardware resources occupied by each user module. CSA Software Filters with EzI2Cs Slave on CY8C20xx6 CE63794 Code Example Name: Example_CSA_EzI 2 Cs_Filters_20xx6 Programming Language: C Associated Part Families: CY8C20xx6 Software Version: PD5.1 (SP2)

More information

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI Embedded Systems and Software Serial Interconnect Buses I 2 C (SMB) and SPI I2C, SPI, etc. Slide 1 Provide low-cost i.e., low wire/pin count connection between IC devices There are many of serial bus standards

More information

Programming Assignment 1: Pushbutton and Light

Programming Assignment 1: Pushbutton and Light CSE 30 WINTER 2010 Programming Assignment 1: Pushbutton and Light Associated Cypress Board: CY3214 Associated Part Family: CY8C24894 PSoC Designer Version: 5.0 Revised: 10.5.2009 Summary When the push

More information

Shadow Registers Datasheet ShadowRegs V 1.1. Features and Overview

Shadow Registers Datasheet ShadowRegs V 1.1. Features and Overview Datasheet ShadowRegs V 1.1 001-16962 Rev. *H Shadow Registers Copyright 2007-2013 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog

More information

CY8C29/27/24/23/21xxx, CY8CLED02/04/08/16, CY8CLED0xD, CY8CLED0xG, CY8C28x45, CY8CPLC20, CY8CLED16P01, CY8C28xxx. Main UM

CY8C29/27/24/23/21xxx, CY8CLED02/04/08/16, CY8CLED0xD, CY8CLED0xG, CY8C28x45, CY8CPLC20, CY8CLED16P01, CY8C28xxx. Main UM Datasheet OneWire V 1.1 001-43362 Rev. *I OneWire Copyright 2008-2014 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog SC Flash

More information

keyestudio Keyestudio MEGA 2560 R3 Board

keyestudio Keyestudio MEGA 2560 R3 Board Keyestudio MEGA 2560 R3 Board Introduction: Keyestudio Mega 2560 R3 is a microcontroller board based on the ATMEGA2560-16AU, fully compatible with ARDUINO MEGA 2560 REV3. It has 54 digital input/output

More information

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C26 Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

PSoC 1 In-Circuit Emulation (ICE) Lite Development Kit Guide CY3215A-DK. Doc. # Rev. *A

PSoC 1 In-Circuit Emulation (ICE) Lite Development Kit Guide CY3215A-DK. Doc. # Rev. *A CY3215A-DK PSoC 1 In-Circuit Emulation (ICE) Lite Development Kit Guide Doc. # 001-80377 Rev. *A Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl):

More information

Microcontroller and Embedded Systems:

Microcontroller and Embedded Systems: Microcontroller and Embedded Systems: Branches: 1. Electronics & Telecommunication Engineering 2. Electrical & Electronics Engineering Semester: 6 th Semester / 7 th Semester 1. Explain the differences

More information

PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING

PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING 9 PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING 1 Introduction 2 Bridge Circuits 3 Amplifiers for Signal Conditioning 4 Strain, Force, Pressure, and Flow Measurements 5 High Impedance Sensors

More information

I Introduction to Real-time Applications By Prawat Nagvajara

I Introduction to Real-time Applications By Prawat Nagvajara Electrical and Computer Engineering I Introduction to Real-time Applications By Prawat Nagvajara Synopsis This note is an introduction to a series of nine design exercises on design, implementation and

More information

Programmable Threshold Comparator Data Sheet

Programmable Threshold Comparator Data Sheet 10. Programmable Threshold Comparator Programmable Threshold Comparator Data Sheet Copyright 2001-2009 Cypress Semiconductor Corporation. All Rights Reserved. CMPPRG Resources CY8C29/27/24/22xxx, CY8C23x33,

More information

PIC Microcontroller Introduction

PIC Microcontroller Introduction PIC Microcontroller Introduction The real name of this microcontroller is PICmicro (Peripheral Interface Controller), but it is better known as PIC. Its first ancestor was designed in 1975 by General Instruments.

More information

Supported Devices: CY8C28x13, CY8C28x33, CY8C28x43, CY8C28x45, CY8C28x52, CY8C21x45, CY8C22x45, CY8C24x93. CY8C24x

Supported Devices: CY8C28x13, CY8C28x33, CY8C28x43, CY8C28x45, CY8C28x52, CY8C21x45, CY8C22x45, CY8C24x93. CY8C24x Current DAC Datasheet IDAC V 1.00 001-85892 Rev. ** 6-Bit Voltage Output DAC Copyright 2013 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog

More information

UART TO SPI SPECIFICATION

UART TO SPI SPECIFICATION UART TO SPI SPECIFICATION Author: Dinesh Annayya dinesha@opencores.org Table of Contents Preface... 3 Scope... 3 Revision History... 3 Abbreviations... 3 Introduction... 3 Architecture... 4 Baud-rate generator

More information

Design Development and Implementation of SPI

Design Development and Implementation of SPI MIT International Journal of Electronics and Communication Engineering, Vol. 4, No. 2, August 2014, pp. 65 69 65 Design Development and Implementation of SPI A. Sirisha Kurnool (DT), A.P, INDIA M. Sravanthi

More information

Pmod modules are powered by the host via the interface s power and ground pins.

Pmod modules are powered by the host via the interface s power and ground pins. 1300 Henley Court Pullman, WA 99163 509.334.6306 www.store. digilent.com Digilent Pmod Interface Specification 1.2.0 Revised October 5, 2017 1 Introduction The Digilent Pmod interface is used to connect

More information

24-Bit Pseudo Random Sequence Generator Data Sheet

24-Bit Pseudo Random Sequence Generator Data Sheet 48. 24-Bit Pseudo Random Sequence Generator 24-Bit Pseudo Random Sequence Generator Data Sheet Copyright 2000-2009 Cypress Semiconductor Corporation. All Rights Reserved. PRS24 PSoC Blocks API Memory (Bytes)

More information

Locktronics PICmicro getting started guide

Locktronics PICmicro getting started guide Page 2 getting started guide What you need to follow this course 2 Using the built-in programs 3 Create your own programs 4 Using Flowcode - your first program 5 A second program 7 A third program 8 Other

More information

Part 1 Using Serial EEPROMs

Part 1 Using Serial EEPROMs Part 1 Using Serial EEPROMs copyright 1997, 1999 by Jan Axelson If you have a project that needs a modest amount of nonvolatile, read/write memory, serial EEPROM may be the answer. These tiny and inexpensive

More information

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA CE97091- PSoC 4: Time-Stamped ADC Data Transfer Using DMA Objective This code example uses a DMA channel with two descriptors to implement a time-stamped ADC data transfer. It uses the Watch Dog Timer

More information

Microcontroller & Interfacing

Microcontroller & Interfacing Course Title Course Code Microcontroller & Interfacing EC406 Lecture : 3 Course Credit Practical : 1 Tutorial : 0 Total : 4 Course Objective At the end of the course the students will be able to Understand

More information

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text In this lecture the detailed architecture of 8051 controller, register bank,

More information

This Application Note demonstrates an SPI-LIN slave bridge using a PSoC device. Demonstration projects are included.

This Application Note demonstrates an SPI-LIN slave bridge using a PSoC device. Demonstration projects are included. Communication - SPI-LIN Slave Bridge Application Note Abstract AN0 Author: Valeriy Kyrynyuk Associated Project: Yes Associated Part Family: CY8C7 GET FREE SAMPLES HERE Software Version: PSoC Designer.

More information

Pridgen Vermeer Robotics Xmega128 Manual

Pridgen Vermeer Robotics Xmega128 Manual Features: 12x PWM signals with 5V supply 8x A/D Inputs with 3.3V supply 2x RS 232 Terminals 1x SPI Interface 4x 8-bit Digital IO ports 3.3V Power Bus LCD Header (4-bit mode) Smart Power Connecter Power

More information

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM FRDM-KL02Z User Manual Rev. 0 Freescale Semiconductor Inc. FRDMKL02ZUM 1. Overview The Freescale Freedom development platform is an evaluation and development tool ideal for rapid prototyping of microcontroller-based

More information

ESPino - Specifications

ESPino - Specifications ESPino - Specifications Summary Microcontroller ESP8266 (32-bit RISC) WiFi 802.11 (station, access point, P2P) Operating Voltage 3.3V Input Voltage 4.4-15V Digital I/O Pins 9 Analog Input Pins 1 (10-bit

More information

The Atmel ATmega328P Microcontroller

The Atmel ATmega328P Microcontroller Ming Hsieh Department of Electrical Engineering EE 459Lx - Embedded Systems Design Laboratory 1 Introduction The Atmel ATmega328P Microcontroller by Allan G. Weber This document is a short introduction

More information

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation ECONseries BUS: USB Type: Economy, Mini-Instruments ECONseries Economy USB Mini-Instruments Flexible Yet Economical A variety of low-cost ECONseries modules are available to provide flexible yet economical

More information

Interrupts, timers and counters

Interrupts, timers and counters Interrupts, timers and counters Posted on May 10, 2008, by Ibrahim KAMAL, in Micro-controllers, tagged Most microcontrollers come with a set of ADD-ONs called peripherals, to enhance the functioning of

More information

Shack Clock kit. U3S Rev 2 PCB 1. Introduction

Shack Clock kit. U3S Rev 2 PCB 1. Introduction Shack Clock kit U3S Rev 2 PCB 1. Introduction Thank you for purchasing the QRP Labs Shack Clock kit. This clock uses the Ultimate3S QRSS/WSPR kit hardware, but a different firmware version. It can be used

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to? ECE3710 Exam 2. Name _ Spring 2013. 5 pages. 102 points, but scored out of 100. You may use any non-living resource to complete this exam. Any hint of cheating will result in a 0. Part 1 Short Answer 1.

More information

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B ZMD400-A01 ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE 802.15.4 Standard DATA SHEET Version B Quan International Co., Ltd., ZMD400 Features Fully compliant 802.15.4 Standard

More information

Changing the Embedded World TM. Module 3: Getting Started Debugging

Changing the Embedded World TM. Module 3: Getting Started Debugging Changing the Embedded World TM Module 3: Getting Started Debugging Module Objectives: Section 1: Introduce Debugging Techniques Section 2: PSoC In-Circuit Emulator (ICE) Section 3: Hands on Debugging a

More information

Freescale Semiconductor Inc. Microcontroller Solutions Group. FRDM-KL46Z User s Manual FRDM-KL46Z-UM Rev. 1.0

Freescale Semiconductor Inc. Microcontroller Solutions Group. FRDM-KL46Z User s Manual FRDM-KL46Z-UM Rev. 1.0 Freescale Semiconductor Inc. Microcontroller Solutions Group FRDM-KL46Z User s Manual FRDM-KL46Z-UM Rev. 1.0 Table of Contents 1 FRDM-KL46Z Overview... 3 2 References documents... 3 3 Getting started...

More information

FRDM-KL03Z User s Guide

FRDM-KL03Z User s Guide Freescale Semiconductor User s Guide Document Number: FRDMKL03ZUG Rev. 0, 7/2014 FRDM-KL03Z User s Guide 1 Overview The Freescale Freedom development platform is an evaluation and development tool ideal

More information

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4 M16C/62P QSK QSK62P Plus Tutorial 1 Software Development Process using HEW4 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW4 (Highperformance Embedded

More information

1st Order Modulator nd Order Modulator

1st Order Modulator nd Order Modulator Datasheet DELSIG11V 3.2 001-13433 Rev. *J 11-Bit Delta Sigma ADC Copyright 2002-2015 Cypress Semiconductor Corporation. All Rights Reserved. Resources PSoC Blocks API Memory (Bytes) Digital Analog CT Analog

More information

Prototyping Module Datasheet

Prototyping Module Datasheet Prototyping Module Datasheet Part Numbers: MPROTO100 rev 002 Zenseio LLC Updated: September 2016 Table of Contents Table of Contents Functional description PROTOTYPING MODULE OVERVIEW FEATURES BLOCK DIAGRAM

More information

AN SIO Tips and Tricks in PSoC 3 / PSoC 5. Application Note Abstract. Introduction

AN SIO Tips and Tricks in PSoC 3 / PSoC 5. Application Note Abstract. Introduction SIO Tips and Tricks in PSoC 3 / PSoC 5 Application Note Abstract AN60580 Author: Pavankumar Vibhute Associated Project: Yes Associated Part Family: CY8C38xxxx Software Version: PSoC Creator Associated

More information

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet HZX-51822-16N03 Bluetooth 4.0 Low Energy Module Datasheet SHEN ZHEN HUAZHIXIN TECHNOLOGY LTD 2017.7 NAME : Bluetooth 4.0 Low Energy Module MODEL NO. : HZX-51822-16N03 VERSION : V1.0 1.Revision History

More information

ERRATA SHEET INTEGRATED CIRCUITS. Date: July 7, 2008 Document Release: Version 1.8 Device Affected: LPC2148

ERRATA SHEET INTEGRATED CIRCUITS. Date: July 7, 2008 Document Release: Version 1.8 Device Affected: LPC2148 INTEGRATED CIRCUITS ERRATA SHEET Date: July 7, 2008 Document Release: Version 1.8 Device Affected: LPC2148 This errata sheet describes both the functional problems and any deviations from the electrical

More information

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus Application Note An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus AN012703-0608 Abstract This Application Note provides an overview of Zilog s Z8 Encore! Serial Peripheral Interface (SPI)

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F330 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

Bolt 18F2550 System Hardware Manual

Bolt 18F2550 System Hardware Manual 1 Bolt 18F2550 System Hardware Manual Index : 1. Overview 2. Technical specifications 3. Definition of pins in 18F2550 4. Block diagram 5. FLASH memory Bootloader programmer 6. Digital ports 6.1 Leds and

More information

AN10210 Using the Philips 87LPC76x microcontroller as a remote control transmitter

AN10210 Using the Philips 87LPC76x microcontroller as a remote control transmitter CIRCUITS ITEGRATED CIRCUITS ABSTRACT This application note illustrates the use of an 87LPC76x microcontroller from Philips Semiconductors as an infrared RC5. Using the Philips 87LPC76x microcontroller

More information

VLSI AppNote: VSx053 Simple DSP Board

VLSI AppNote: VSx053 Simple DSP Board : VSx053 Simple DSP Board Description This document describes the VS1053 / VS8053 Simple DPS Board and the VSx053 Simple DSP Host Board. Schematics, layouts and pinouts of both cards are included. The

More information

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design By Nasser Poureh, Avnet Technical Marketing Manager Mohammad Qazi, Maxim Application Engineer, SP&C Version 1.0 August 2010 1

More information

Cypress PSoC 4 Microcontrollers

Cypress PSoC 4 Microcontrollers Cypress PSoC 4 Microcontrollers Your Problem-Solver on Chip WWW.CYPRESS.COM/PSOC4 THE DIFFERENTIATION DILEMMA Embedded systems are rapidly advancing with innovative features added at each new product generation.

More information

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT 1 Lecture 5: Computing Platforms Asbjørn Djupdal ARM Norway, IDI NTNU 2013 2 Lecture overview Bus based systems Timing diagrams Bus protocols Various busses Basic I/O devices RAM Custom logic FPGA Debug

More information

ECG (EKG) Primer Jingxi Zhang ABSTRACT

ECG (EKG) Primer Jingxi Zhang ABSTRACT ECG (EKG) Primer Jingxi Zhang ABSTRACT This project is for detecting human ECG (Electrocardiogram, or EKG). A tiny amplifier is embedded (

More information

Pic24f Family Reference Manual Section 14. Timers

Pic24f Family Reference Manual Section 14. Timers Pic24f Family Reference Manual Section 14. Timers Get Started Here 8-bit Peripheral Summary, Timers. Timers, Timer 0 (TMR0). Timer 0 For more information about the oscillator failure trap, refer to "Section

More information

Raspberry Pi - I/O Interfaces

Raspberry Pi - I/O Interfaces ECE 1160/2160 Embedded Systems Design Raspberry Pi - I/O Interfaces Wei Gao ECE 1160/2160 Embedded Systems Design 1 I/O Interfaces Parallel I/O and Serial I/O Parallel I/O: multiple input/output simultaneously

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Microcontroller Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor

More information

CY3280-BBM Universal CapSense TM Prototyping Module Kit Quick Start

CY3280-BBM Universal CapSense TM Prototyping Module Kit Quick Start CY3280-BBM Universal CapSense TM Prototyping Module Kit Quick Start Doc. # 001-43368 Rev. ** Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 (Intnl): 408.943.2600

More information

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F38X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F38x Development Kit contains the following items: C8051F380 Target Board C8051Fxxx Development Kit Quick-start Guide Silicon Laboratories

More information

PIC Serial Peripheral Interface (SPI) to Digital Pot

PIC Serial Peripheral Interface (SPI) to Digital Pot Name Lab Section PIC Serial Peripheral Interface (SPI) to Digital Pot Lab 7 Introduction: SPI is a popular synchronous serial communication protocol that allows ICs to communicate over short distances

More information

Comparator (Comp) Features. General Description. When to use a Comparator 1.60

Comparator (Comp) Features. General Description. When to use a Comparator 1.60 1.60 Features Low input offset User controlled offset calibration Multiple speed modes Low power mode Output routable to digital logic blocks or pins Selectable output polarity Configurable operation mode

More information

The Atmel ATmega168A Microcontroller

The Atmel ATmega168A Microcontroller Ming Hsieh Department of Electrical Engineering EE 459Lx - Embedded Systems Design Laboratory The Atmel ATmega168A Microcontroller by Allan G. Weber 1 Introduction The Atmel ATmega168A is one member of

More information

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar Clock and Fuses Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar Reference WHY YOU NEED A CLOCK SOURCE - COLIN O FLYNN avrfreaks.net http://en.wikibooks.org/wiki/atmel_avr

More information

Doc: page 1 of 6

Doc: page 1 of 6 Nanocon Reference Manual Revision: February 9, 2009 Note: This document applies to REV A-B of the board. 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The Nanocon board is

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

Propeller Board of Education (#32900)

Propeller Board of Education (#32900) Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Office: (916) 624-8333 Fax: (916) 624-8003 Sales: (888) 512-1024 Tech Support: (888) 997-8267

More information

Home Security System with Remote Home Automation Control

Home Security System with Remote Home Automation Control Home Security System with Remote Home Automation Control Justin Klumpp Senior Project Hardware Description Western Washington University April 24 2005 Professor Todd Morton Introduction: This document

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F931 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system. Course Code: EEE 4846 International Islamic University Chittagong (IIUC) Department of Electrical and Electronic Engineering (EEE) Course Title: Embedded System Sessional Exp. 1: Familiarization with necessary

More information

ARDUINO YÚN MINI Code: A000108

ARDUINO YÚN MINI Code: A000108 ARDUINO YÚN MINI Code: A000108 The Arduino Yún Mini is a compact version of the Arduino YUN OVERVIEW: Arduino Yún Mini is a breadboard PCB developed with ATmega 32u4 MCU and QCA MIPS 24K SoC CPU operating

More information

BV511 Hardware Guide ByVac ByVac Revision 1.0

BV511 Hardware Guide ByVac ByVac Revision 1.0 BV511 Hardware Guide ByVac ByVac 2007 www.byvac.co.uk Revision 1.0 ByVac 1 Copyright in this work is vested in ByVac and the document is issued in confidence for the purpose only for which it is supplied.

More information

Interconnects, Memory, GPIO

Interconnects, Memory, GPIO Interconnects, Memory, GPIO Dr. Francesco Conti f.conti@unibo.it Slide contributions adapted from STMicroelectronics and from Dr. Michele Magno, others Processor vs. MCU Pipeline Harvard architecture Separate

More information

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

XNUCLEO-F030R8, Improved STM32 NUCLEO Board XNUCLEO-F030R8, Improved STM32 NUCLEO Board STM32 Development Board, Supports Arduino, Compatible with NUCLEO-F030R8 XNUCLEO-F030R8 Features Compatible with NUCLEO-F030R8, onboard Cortex-M0 microcontroller

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter C8051F32X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F32x Development Kit contains the following items: C8051F320 Target Board C8051Fxxx Development Kit Quick-Start Guide C8051F32x Development

More information

LPF (Optional) CY8C24x93. Without LPF and ISR to 3* With LPF only** to 3* With ISR only to 3*

LPF (Optional) CY8C24x93. Without LPF and ISR to 3* With LPF only** to 3* With ISR only to 3* Datasheet CMP V 1.00 001-85893 Rev. ** Comparator Copyright 2013 Cypress Semiconductor Corporation. All Rights Reserved. PSoC Resources API Memory (Bytes) UM Configurations CMP LPF (Optional) Analog Interrupt

More information

INTEGRATED CIRCUITS DATA SHEET. PCF2119x-2 LCD controllers/drivers. Product specification File under Integrated Circuits, IC12

INTEGRATED CIRCUITS DATA SHEET. PCF2119x-2 LCD controllers/drivers. Product specification File under Integrated Circuits, IC12 INTEGRATED CIRCUITS DATA SHEET File under Integrated Circuits, IC12 28. August 2000 CONTENTS 1 FEATURES 1.1 Note 2 APPLICATIONS 3 GENERAL DESCRIPTION 4 ORDERING INFORMATION 5 BLOCK DIAGRAM 6 PAD INFORMATION

More information