Power integrated circuits

SPI_FNs.C

init_IO

  • The SPI is clocked by CCLK/8, the maximum allowed. This SCLK is 48MHz/8 = 6MHz.
  • The SSP is clocked by CCLK/(2 × VBDIV). VBDIF is set to 1, making the MAX3421E SCK signal equal to 48MHz/2 = 24MHz. The MAX3421E SCLK input can run as high as 26MHz.

About the SPI Interface

  • MOSI Master Out, Slave In data
  • MISO Master In, Slave Out data
  • SCLK Serial Clock, supplied by the LPC2138
  • SS# Slave Select, driven by the LPC2138

About the SSP InterfaceHwreg
Hwritebytes
HwregHwritebitesHrreg
Hreadbytes
More About the SSP Interfaceoutin

  1. Assert SS# (low)
  2. Send a command byte consisting of a register number and a direction bit
  3. Send/receive one or more data bytes
  4. De-assert SS# (high)

outininininPwreg
PwregAS
Pwritebytes
MAX3420E Programming Guide»Prreg
PrregAS
Preadbytes

Introduction

  • Study, operate, test, and modify a functional USB device based on an ARM7 microcontroller (µC) connected to a MAX3420E USB peripheral controller.
  • Study, operate, test, and modify a functional USB host that uses the same ARM7 µC connected to a MAX3421E host controller. Figure 1 shows data retrieved by the host from a USB memory stick.
  • Connect the host to the peripheral with a USB cable and run both host and peripheral at the same time. When developing either USB host or USB peripheral code, it is very useful to have a reference design at the other end of the USB cable. By doing this, both sides of the USB cable, host and peripheral, are controllable and customizable since they are both implemented by the same C code.

Figure 1. The MAX3421 host/ARM retrieves enumeration data from any USB peripheral device, and reports results over a serial port connected to a PC running a terminal emulation program.

Power Development Boards

MAX20323EVKIT

Evaluates the USB Type-C CC-pin overvoltage protection device. Learn more ›

MAX77958EVKIT-2S3

Evaluates the standalone USB Type-C CC detection and USB power delivery controller.Learn more ›

MAX77962EVKIT-12

Evaluates the 3.2A USB Type-C buck-boost charger for 2S Li-ion batteries.Learn more ›

MAX22701EVKIT

Includes two identical ICs for measurement of part-to-part propagation delay matching.Learn more ›

Isolated 24V to 5V, 12.5W No-Opto Flyback Power Supply

MAXREFDES120

Compact 24V input module with secondary-side synchronous MOSFET driver that features 5V at 2.5A output.Learn more ›

Isolated 24V to 5V, 9W No-Opto Flyback Power Supply

MAXREFDES119

Compact 24V input module with secondary-side synchronous MOSFET driver that features 5V at 1.8A output.Learn more ›

Evaluation Kit for 4.5V to 42V, 300mA uSLIC Power Module for 3.3V Output

MAXM15462EVKIT

Integrated power solution providing 3.3V from a wide input range of 4.5V to 42V with up to 300mA of current.Learn more ›

4V to 42V, 100mA, Compact Step-Down Power Module

MAXM17532

The MAXM17532 is a step-down DC-DC power module built in a compact uSLICTM package. The MAXM17532 integrates a controller, MOSFETs, an inductor, as well as the compensation components. The device operates from an input voltage of 4.0V to 42V, supports an adjustable output voltage from 0.9V to 5.5V, and supplies up to 100mA of load current. The high level of integration significantly reduces design complexity, manufacturing risks and offers a true “plug and play” power supply solution, hence reducing the time-to-market.

Evaluation Kit for 4V to 42V, 100mA uSLIC Power Module for 5V Output

MAXM17532EVKIT

Integrated power solution providing 5V from a wide input range of 10V to 42V with up to 100mA of current.Learn more ›

Isolated 24V to 3.3V 33W Power Supply

MAXREFDES121

Isolated, industrial power-supply reference design with an efficient active-clamp topology design with 24V input.Learn more ›

MAXREFDES125

High-efficiency, 20W power supply for industrial and broad power-supply applications. Learn more ›

Isolated, 24V to 5V, 10W Power Supply Reference Design

MAXREFDES114

Compact, 24V input, forward converter module with 5V at 2A output and pre-qualified transformers.Learn more ›

Isolated 24V to 5V, 2W Flyback Power Supply

MAXREFDES111

Industrial power-supply reference design features an efficient flyback topology with 24V input, and a 5V output at 2W of power (0.4A)Learn more ›

Developing Peripheral Code

3421_Host.C

An Example

hidkb_enum_tables.h

// STRING descriptor 1--Manufacturer ID
{
18,             // bLength
0x03,           // bDescriptorType = string
'X','Y','Z',' ','W','i','d','g','e','t',' ','C','o','m','p','a','n','y'
},

Figure 5. Not Good. Code example shows that the manufacturer’s name is not want you intended to show. There is clearly a problem with the code.XZWde op?

// STRING descriptor 1--Manufacturer ID
        {
        35                      // bLength
        0x03,                   // bDescriptorType = string
        'X',0,'Y',0,'Z',0,' ',0,'W',0,'i',0,'d',0,'g',0,'e',0,'t',0,
        ' ',0,'C',0,'o',0,'m',0,'p',0,'a',0,'n',0,'y' // Unicode!
        },

Figure 6. Better. Using the Unicode format, you see this result.

// STRING descriptor 1--Manufacturer ID
        {
        37               // bLength
        0x03,                   // bDescriptorType = string
        'X',0,'Y',0,'Z',0,' ',0,'W',0,'i',0,'d',0,'g',0,'e',0,'t',0,
        ' ',0,'C',0,'o',0,'m',0,'p',0,'a',0,'n',0,'y' // Unicode!
        },

Figure 7. Best. The code now does what you thought it should.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector