Pcb Buffer Logic
Pcb Buffer Logic

Designing USB Applications with PSoC
Design engineers have long been familiar with USB, first introduced in 1995 to replace the aging RS232 interface. It represents a simple, elegant means of communicating with as many as 126 connected devices using a well-defined protocol.
However, adding USB to an existing product is not necessarily simple or elegant, and adding it to new projects adds a degree of complexity that may now be largely avoidable.
Cypress Semiconductor’s CY8C24794-24LFXI is a member of its popular Programmable System-on-Chip (PSoC) family of mixed-signal arrays. The 24794 includes a full-speed (12 Mbps) USB 2.0 Serial-Interface Engine (SIE), including a 0.25 percent accurate clock with an integrated oscillator that meets USB 2.0 clocking specifications and requires no external crystal, reducing component and pin counts. The device offers PSoC designers a complete USB interface, essentially for free.
The CY8C24794 provides four unidirectional endpoints and one bi-directional control endpoint to support control, interrupt, isochronous, and bulk transfer types, as well as flexible synchronization. It offers up to 48 analog inputs, so no external analog multiplexer is required for applications such as laptop touchpads using CapSense technology. This article describes the new PSoC, its USB interface and applications that can be easily designed using the device.
Not Your Father’s SoC
The PSoC family of devices are designed to replace traditional MCUs, system ICs, and the numerous discrete components that surround them. This architecture allows the user to create customized peripheral configurations that match the requirements of each individual application. Additionally, a fast CPU, Flash program memory, SRAM data memory, and configurable I/O are included in a range of pin-outs and packages. The PSoC CY8C24794 is a unique member of the PSoC family because it includes a full-featured, full-speed (12 Mbps) USB port.
The PSoC architecture (Figure 1) consists of four main areas: PSoC Core, Digital System, Analog System, and System Resources including a full-speed USB port. Configurable global busing allows all the device resources to be combined into a complete custom system. The PSoC CY8C24794 device can have up to seven I/O ports that connect to the global digital and analog interconnects, providing access to four digital blocks and six analog blocks.
The PSoC core consists of a 24-MHz, 4-MIPS Harvard-architecture CISC CPU with 16-Kbits of Flash for program storage, 1-Kbit of SRAM for data storage and up to 2Kbits of EEPROM emulated using the Flash. Program Flash utilizes four protection levels on blocks of 64 bytes, allowing customized software IP protection. The PSoC device incorporates flexible internal clock generators, including a 24 MHz internal main oscillator (IMO) accurate to 8% over temperature and voltage. The 24 MHz IMO can also be doubled to 48 MHz for use by the digital system. A low power 32 kHz internal low-speed oscillator (ILO) is provided for the Sleep timer and watchdog timer (WDT).
PSoC GPIOs provide connection to the CPU, digital and analog resources of the device. Each pin’s drive mode may beselected from eight options, allowing great flexibility in external interfacing. Every pin also has the capability to generate a system interrupt on high level, low level, and change from last read.
The Digital System (Figure 2) is composed of four digital PSoC blocks. Each block is an 8-bit resource that can be used alone or combined with other blocks to form 8, 16, 24, and 32-bit peripherals. The digital blocks can be connected to any GPIO through a series of global buses that can route any signal to any pin. The buses also allow for signal multiplexing and for performing logic operations. This configurability frees designs from the constraints of a fixed peripheral controller.
The Analog System (Figure 3) consists of six configurable blocks, each comprised of an op amp circuit allowing the creation of complex analog signal flows. Analog peripherals are very flexible and can be customized to support specific application requirements. Analog blocks are arranged in a column of three, which includes one Continuous Time (CT) and two Switched Capacitor (SC) blocks.
The CY8C21x34 and CY8C24x94 PSoC devices differ from the other PSoC devices in that GPIO pins can connect to the internal analog bus. The CY8C24x94 contains the additional capability to optionally split the analog bus into two separate sections. In the CY8C21x34 all GPIO pins are enabled for this connection. In the CY8C24x94 all pins in Ports 0 through 5 are enabled for connection to the analog Bus.
System Resources provide additional capability useful to complete systems. Additional resources include a multiplier, decimator, low voltage detection, and power on reset.
PSoC USB
The PSoC USB system resource adheres to the USB 2.0 specifications for full-speed devices operating at 12 Mb/second with one upstream port and one USB address. PSoC USB (Figure 4) consists of a Serial Interface Engine (SIE) block; a PSoC Memory Arbiter (PMA) block; 256 bytes of dedicated SRAM; a Full-Speed USB Transceiver with internal regulator; and two dedicated USB pins.
At the system level, the full-speed USB system resource interfaces to the rest of the PSoC by way of the M8C's register access instructions and to the outside world by way of the two USB pins.
The SIE supports five endpoints including a control endpoint (endpoint 0) and four data endpoints (endpoint 1, 2, 3, and 4). The control endpoint can be configured to support SETUP, IN, and OUT requests. The data endpoints can be individually configured to respond to Interrupt, Bulk, or Isochronous IN or OUT requests.
The USB Serial Interface Engine (SIE) allows the PSoC device to communicate with the USB host at full-speed data rates. The SIE simplifies the interface to USB traffic by automatically handling the following USB processing tasks without firmware intervention:
• Translating the encoded received data and format the data to be transmitted on the bus.
• CRC Checking and Generation. Incoming packets failing checksum verification are ignored.
• Address Checking. Ignores all transactions not addressed to the device.
• Sending appropriate ACK/NAK/Stall handshakes.
• Identifying token type (SETUP, IN, OUT) and setting the appropriate token bit once a valid token in received.
• Identifying Start-of-Frame (SOF) and saving the frame count.
• Sending data to or retrieving data from the USB SRAM, by way of the PSoC Memory Arbiter.
Firmware is required to handle various parts of the USB interface. The SIE issues interrupts after key USB events to direct firmware to appropriate tasks: fill and empty the USB data buffers in USB SRAM; enable PMA channels appropriately; coordinate enumeration by decoding USB device requests; suspend and resume coordination; verify and select data toggle values.
The PSoC USB System Resource contains a dedicated 256 byte SRAM. This SRAM is identical to an SRAM page used in the PSoC Core; however, it is not accessible by way of the M8C memory access instructions. The PSoC USB's dedicated SRAM may only be accessed by way of the PMA registers.
The PSoC Memory Arbiter (PMA) is the interface between the PSoC USB's dedicated SRAM and the two blocks that access the SRAM: the M8C and the USB SIE. The PMA provides eight channels to manage data. All of the channel registers may be used by the M8C, but the four non-control USB endpoints are each allocated to a specific set of PMA channel registers. The internal USB transceiver interfaces to the external USB bus to transmit and receive signals according to the USB 2.0
Specification. In normal USB operation, the transceiver interfaces directly to the SIE and no user interaction is needed after initialization.
Connecting to an external USB device is simple, requiring only the addition of two resistors. Figure 5 shows a sample schematic for USB with the 56-pin MLF PSoC device (CY8C24794).
The CY8C24794-24LFXI includes Cypress’ CapSenseTM technology, which offers an efficient solution to replace mechanical switches and controls with simple, touch-sensitive controls. The PSoC architecture makes it easy to connect touch-sensitive controls to LED drivers, LCD displays and other peripherals.
In its basic form, a capacitive switch is a pair of adjacent plates, as shown in Figure 6a. There is a small edge-to-edge capacitance, but the intent of switch layout is to minimize the capacitance between these plates. When a conductive object is placed in proximity to the two plates, as shown in Figure 6b, there is a capacitance between one electrode and the conductive object and a similar capacitance between the conductive object and the other electrode.
The most common form of capacitance switch array is a set of capacitors where one side of each is grounded. Thus, the active capacitor has only one accessible side; the switch is a grounded variable capacitor. The presence of the conductive object increases the capacitance of the switch to ground. Determining switch activation is then a matter of measuring change in the capacitance.
The CY8C21x34 family has unique features that enable efficient designs for capacitive switch scan applications. The features include wide multiplexer array so that all channels being measured can be serviced by a common comparator and current source; a DAC adjustable current source; and automatic connection of comparator and reset switch.
This drive and multiplex arrangement bypasses the existing GPIO to connect the selected pin to an internal Analog Mux Bus, as shown in Figure 7. The capacitor charging current (IDAC, controlled by register DAC_D) and reset switch are connected to the Analog Mux Bus. This limits the pin-count requirement to simply the number of switches to be addressed; no external resistors or capacitors are required to enable operation.
The basic circuit and firmware of the PSoC CapSense solution are relatively simple, the physical design of the switchoperating environment is less so. There are three major categories for consideration when designing with capacitive sensing: the printed circuit board (PCB), the overlay material, and other elements not related to the PCB or capacitive sensing. Cypress has a series of application notes that cover these areas in more detail than we can manage here.
Example: Buttons and Lights
The CY8C24794 is supported by PSoC DesignerTM software, an evaluation board, ICE-Cube in-circuit emulator and miniprogrammer, all of which make it easy to experiment with new designs. The basic USB-based design described here lets you press a button on your target host PC and light up lights on the evaluation board. With all USB designs you are always dealing with two programs: one in the host and one in the remote device. A USB device does not actually ‘send’, it prepares data that the USB host will come and collect; the host controls all communications and a device only ‘talks’ when the host permits it.
The flow chart in Figure 8 shows the logical operation of the programs in both the device and the host in our example:
The USB_Start() call initiates the enumeration sequence that is handled by the USB User Module libraries; once enumeration is completed, we then post a buffer to receive a lights report from the PC. We then wait for an SOF flag to be set. The SOF_ISR sets this flag every 1 msec.
Once the SOF flag is set, we call scan-buttons(), which is a button de-bouncing routine. If we detect a button change, then we send a buttons report to the PC. We then check to see if a lights report was received in the previous frame; and, if so, we update the local LEDs. Note that from main()’s perspective, data is moved into and out of endpoint buffers; USB communications are handled in the background by the SIE. The USB run-time operation is as simple as reading and writing endpoint buffers.
For more information log on to http://www.cypress.com/?rID=3564
About the Author
Jon Pearson, is the Product Marketing Director at Cypress Semiconductor Corp.
Here are some excellent choices for
Pcb Buffer Logic
![]() |
![]() Sanyo DP32746 32 720p HD LCD Television Used Good picture $99.00 (1 Bid) Time Remaining: 31m |
![]() 13 Flip down under cabinet kitchen LCD TV DVD Freeview $300.26 Time Remaining: 32m |
![]() LG 5260 HD LCD Television 120Hz $550.00 Time Remaining: 38m Buy It Now for only: $775.00 |
![]() Toshiba 32DT2U Toshiba 32DT2U 32DT2U 32 class 720p 60Hz LCD TV $369.79 Time Remaining: 44m Buy It Now for only: $369.79 |
![]() COBY TFDVD3295 32 LCD TELEVISION WITH DVD PLAYER $275.00 Time Remaining: 45m Buy It Now for only: $275.00 |
![]() Emerson LC320EM2F 32 720p HD LCD Television $200.00 Time Remaining: 50m Buy It Now for only: $250.00 |
![]() Vizio E3D420VX 42 Full 3D 1080p HD LCD Internet TV $491.00 Time Remaining: 52m Buy It Now for only: $491.00 |
![]() Sansui HDLCDVD328 32 LCD TV DVD COMBO 1080P BLACK $347.20 Time Remaining: 54m Buy It Now for only: $347.20 |
![]() Vizio E321VL 32 720p HD LCD Television AS IS TURNS ON FOR PARTS OR REPAIR $109.99 (2 Bids) Time Remaining: 55m |
![]() PANASONIC 42in PLASMA TELEVISION MODEL TH42PX25 LINES PICKUP ONLY NO SHIP $45.00 Time Remaining: 58m Buy It Now for only: $55.00 |
![]() Mitsubishi Gold Plus Series 55 1080i HD Rear Projection Television $200.00 Time Remaining: 1h 5m Buy It Now for only: $225.00 |
![]() Innovative DTV Solutions Inc DPDM70R RCA 7 DVD Player with Digital TV $124.93 Time Remaining: 1h 7m Buy It Now for only: $124.93 |
![]() Vizio M220MV 22 1080p HD LED LCD Television $165.50 Time Remaining: 1h 9m Buy It Now for only: $165.50 |
![]() JVC 22 Full HD 1080p LED Backlit VGA HDMI Monitor Compatable HDTV LT 22EM72 $199.90 Time Remaining: 1h 10m Buy It Now for only: $199.90 |
![]() Vocopro LTV 5 5 Television $120.00 Time Remaining: 1h 13m Buy It Now for only: $120.00 |
![]() ORION AMERICA televisions SLED1928 Sansui 19In HD LED TV $175.50 Time Remaining: 1h 15m Buy It Now for only: $175.50 |
![]() Open Box Samsung SyncMaster B2230HD LCD 22 1080P HDTV Monitor TV Television $78.77 (8 Bids) Time Remaining: 1h 18m |
![]() 32 inch Hyperion 32T51 Widescreen LCD HDTV $200.00 (3 Bids) Time Remaining: 1h 19m |
![]() Innovative DTV Solutions DHT235D 4 LCD Television $35.00 Time Remaining: 1h 19m |
![]() Toshiba 32DT2U 32DT2U 32 class 720p 60Hz LCD TV $369.79 Time Remaining: 1h 21m Buy It Now for only: $369.79 |
![]() Magnavox 32MF301B 32 720p HD LCD Television Read description $259.99 Time Remaining: 1h 32m |
![]() Sharp PNE421 42 LCD Monitor $1,024.53 Time Remaining: 1h 33m Buy It Now for only: $1,024.53 |
![]() SONY LCD TV KDL 40V2500 KDL 46V2500 SERVICE REPAIR CD $5.95 Time Remaining: 1h 35m Buy It Now for only: $5.95 |
![]() LG 42PT350 42 720p HD Plasma Television $418.00 Time Remaining: 1h 36m Buy It Now for only: $460.00 |
![]() Vizio 32 E321VL Flat Panel 720P 60Hz 100000 1 Contrast LCD HDTV TV FREE SH $181.13 (18 Bids) Time Remaining: 1h 39m |
![]() Vizio VA22LFHDTV10T 22 1080p HD LCD Television $135.00 Time Remaining: 1h 43m Buy It Now for only: $150.00 |
![]() Panasonic VIERA TC L42E50 42 Inch 1080p Full HD IPS LED LCD TV AS IS $99.97 Time Remaining: 1h 51m |
![]() Vizio 32 E320VA Flat Panel LCD HD TV 720p HDMI Black 500001 Contrast $177.50 (25 Bids) Time Remaining: 1h 52m |
![]() INSIGNIA 26 LCD HDTV NS L26Q 10A 720p FOR REPAIR $25.00 Time Remaining: 1h 55m Buy It Now for only: $35.00 |
![]() AUVIO 16 972 35 LCD Television $75.00 Time Remaining: 1h 55m Buy It Now for only: $75.00 |
![]() Vizio 32 E321VL Flat Panel LCD HD TV Full HD 720p TV 1000001 Contrast Ratio $182.00 (17 Bids) Time Remaining: 2h 2m |
![]() Vizio 37 E371VL Flat Panel Full HDTV TV 1080P 60Hz 1000001 Contrast FREE SH $245.86 (11 Bids) Time Remaining: 2h 7m |
![]() TRUE TECH TRUETECH Space Saving Kitchen 10 LCD DVD Player Model KLV3110 $24.99 (1 Bid) Time Remaining: 2h 9m |
![]() Vizio 32 E321VL Flat Panel LCD HD TV Full HD 720p TV 1000001 Contrast Ratio $180.00 (15 Bids) Time Remaining: 2h 12m |
![]() 1986 Sony Watchman FD 10A Television WORKS $9.99 Time Remaining: 2h 13m |
![]() Polaroid TLA 01911C 19 1080i HD LCD Television $59.99 Time Remaining: 2h 19m Buy It Now for only: $125.00 |
![]() Vizio 32 E320VA Flat Panel LCD HD TV 720p HDMI Black 500001 Contrast Ratio $178.63 (21 Bids) Time Remaining: 2h 22m |
![]() Digital Prism ATSC 710 7 480i HD LCD Television $39.99 Time Remaining: 2h 23m |
![]() Casio TV 980 2 LCD Television $14.99 Time Remaining: 2h 26m Buy It Now for only: $19.99 |
![]() GPX 19 DIAG LCD TV WITH BUILT IN DVD PLAYER ATSC TUNER $149.99 Time Remaining: 2h 27m |
![]() Televisions for sale for parts $75.00 Time Remaining: 2h 30m |
![]() Vizio 55 E551VA Flat LCD HD TV 1080p TV HDMI 120Hz 6ms WiFi Internet Apps $589.63 (30 Bids) Time Remaining: 2h 33m |
![]() Samsung LN37A450C1D Television in perfect condition $290.00 Time Remaining: 2h 38m Buy It Now for only: $350.00 |
![]() Sanyo CLT2054 20 EDTV LCD Television $130.00 Time Remaining: 2h 39m Buy It Now for only: $130.00 |
![]() Vizio 19 E190VA Razor LED LCD HD TV 720p 075 SLIM 5ms HDMI 200001 Contrast $91.00 (11 Bids) Time Remaining: 2h 44m |
![]() AS IS Broken Vizio E220VA 22 1080p HD TV for parts or repair $32.50 (9 Bids) Time Remaining: 2h 46m |
![]() Vizio 22 E220VA 1080P 60Hz 200001 075 Thin Razor TV LCD LED HDTV FREE SH $102.50 (17 Bids) Time Remaining: 2h 46m |
![]() Portable 7 DVB T Digital TV Recorder Media Player $144.26 Time Remaining: 2h 47m Buy It Now for only: $144.26 |
![]() PANASONIC VIERA TC P46ST30 1080P 3D 600HZ HDTV PLASMA TELEVISION TV LCD 46 $700.00 Time Remaining: 2h 50m |
![]() NICE RCA 15L500TD 15 TFT LCD TV MONITOR WITH DVD PLAYER +REMOTE $146.98 Time Remaining: 2h 51m Buy It Now for only: $146.98 |
![]() Vizio 37 E371VL Flat Panel LCD HD TV Full HD 1080p TV $194.86 (18 Bids) Time Remaining: 2h 53m |
![]() Open Box Samsung T27A300 27 1080p LED LCD HDTV HD TV Monitor HDMI $182.50 (2 Bids) Time Remaining: 2h 53m |
![]() Vizio 32 E320VA Flat Panel LCD HD TV 720p HDMI Black 500001 Contrast $172.50 (9 Bids) Time Remaining: 2h 54m |
![]() Vizio 55 M550SV LED HD TV Full HD 1080p 240Hz N Band WiFi Vzio Internet Apps $710.00 (24 Bids) Time Remaining: 2h 57m |
![]() Vizio 22 E220VA Razor LED LCD HD TV 1080p 075 SLIM 5ms HDMI 200001 Contrast $113.50 (45 Bids) Time Remaining: 2h 59m |
![]() Proscan 47 LCD HD TV 47 inch HDTV 4 HDMI VGA $450.00 Time Remaining: 3h Buy It Now for only: $450.00 |
![]() Vizio M320VT 32 1080p HD LED LCD Television $201.00 (7 Bids) Time Remaining: 3h |
![]() PIONEER MEDIA RECEIVER PDP AR05U $400.00 Time Remaining: 3h 3m Buy It Now for only: $500.00 |
![]() Vizio 32 E321VL Flat Panel LCD HD TV Full HD 720p TV 1000001 Contrast Ratio $152.50 (26 Bids) Time Remaining: 3h 4m |
![]() 19 LED w DVD 720p 5ms SC 1912 $228.99 Time Remaining: 3h 5m Buy It Now for only: $228.99 |
"In Association with Amazon.Com"
![]() |
Panasonic VIERA TC-L32C5 32-Inch 720p LCD TV List Price: Sale Price: Too low to display |
DescriptionA Casual Style Performer The TC-L32C5 (32-inch class) is a 720p, LCD HDTV (cold cathode backlighting) with two HDMI terminals, one USB port, a PC input, and game mode. It is Energy Star certified and has a long-life panel... |
![]() |
Panasonic VIERA TC-L32C3 32-Inch 720p LCD HDTV List Price: Sale Price: $399.00 |
Description(March 2011) Panasonic Features VIERA Image VIEWER™ Equipped with an SD card slot, VIERA makes it easy to view full-HD photos and motion images that you shot yourself. Simply insert the SD memory card into the slot, and you're ready to view your photos and full-HD videos on the big screen... |
![]() |
LG 32CS460 32-Inch 720p 60 Hz LCD HDTV List Price: Sale Price: Too low to display |
DescriptionCS460 LCD HDTV Looking for an HDTV with great picture quality for an additional room or the bedroom? You've found it with CS460 HDTV. KEY TECHNOLOGIES Find the perfect picture Get easy self-calibration with on-screen reference points for key picture quality elements such as black level, color, tint, sharpness and backlight levels... |
![]() |
Samsung UN19D4003 19-Inch 720p 60Hz LED HDTV (Black) [2011 MODEL] List Price: Sale Price: Too low to display |
DescriptionFebruary 2011The Samsung UN19D4003 LED TV lets you watch your favorite movies--and memories--with incredible LED picture quality on a 19-inch HDTV. Samsung's ConnectShare Movie technology lets you plug in a thumb drive or other USB device and play media files using your remote to control it all... |
![]() |
LG 32LK330 32-Inch 720p 60 Hz LCD HDTV List Price: Sale Price: $299.99 |
DescriptionMove into the entertainment experience you've been waiting for with the 32LK330 LCD HDTV. Everything looks crisper, more vibrant, and more colorful on an HDTV. It's about time your entertainment stepped up to meet your expectations... |
![]() |
LG 42LK450 42-Inch 1080p 60 Hz LCD HDTV List Price: Sale Price: $419.99 |
DescriptionIf you been hearing about how amazing Blu-ray entertainment is, or how much better your favorite shows would look in HD, you've heard right. The thing is, you need 1080p Full HD to get the most out of both... |
![]() |
LG 42LK520 42-Inch 1080p 120 Hz LCD HDTV List Price: Sale Price: $495.00 |
DescriptionIf you want high definition for your HD content, games and Blu-ray entertainment, there's nothing better than 1080p Full HD. And if you want sports and fast action to be as a crisp as they are exciting, TruMotion 120Hz virtually loses the blur and keeps the sizzle... |
![]() |
Sony BRAVIA KDL32BX330 32-Inch 720p HDTV, Black List Price: Sale Price: Too low to display |
DescriptionGet great Sony high-definition picture quality with the Sony® BX-Series HDTV |
![]() |
LG 42CS560 42-Inch 1080p 60 Hz LCD HDTV List Price: Sale Price: Too low to display |
DescriptionCS560 LCD HDTV Looking for an HDTV with great picture quality at an affordable price? You've found it with CS560 LCD HDTV. KEY TECHNOLOGIES Double the detail This stunning picture is the reason you wanted HDTV in the first place... |
Thank You for Visiting Oled-Television.Net

































































![Samsung UN19D4003 19-Inch 720p 60Hz LED HDTV (Black) [2011 MODEL]](http://www.oled-television.net/media/images/i/31K2up5aSCL._SL160_.jpg)




