HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge —...

13
Rev. 1.10 1 December 27, 2017 HT42B564-x USB (HID) to UART Bridge IC USB Bridge IC Naming Rules HT42B 5 64 -x Product Family HT42B = Holtek Bridge IC Bridge Series of Host 5 = USB USB Class type Version 1 = First Version Bridge Series of Device 2 = I 2 C 3 = SPI 4 = UART 3 = CDC Class 6 = HID Class Features • Operating Voltage (V DD ): 3.3V~5.5V • UART pin Voltage (V DDIO ): 1.8V~V DD (Less than V DD voltage) • Power down and wake-up functions to reduce power consumption • Fully integrated 12MHz oscillator with 0.25% accuracy for all USB modes which requires no external components • USB interface USB 2.0 Full Speed compatible Implements USB Human Interface Device (HID) class Internal 1.5kΩ pull-high resistor on D+ pin • Fully-duplex Universal Asynchronous Receiver and Transmitter Interface – UART Supports Baud Rate up to 115200bps Supports maximum 32 bytes transmit buffer and 32 bytes receive buffer UART Data formats supported: – Data bits: 8 – Stop bits: 1 and 2 – Parity: odd, even, no parity Supports RX pin resume signal to request a remote wake-up Supports VDDIO pin for UART pins power supply • Supports standard Windows ® drivers for Windows XP, Vista, Win 7, Win 8/8.1, Win10 • Package types: 10-pin SOP General Description The HT42B564-x device is a high performance USB to UART bridge controller with fully integrated USB and UART interface functions, designed for applications that communicate with various types of UART. The device includes a USB 2.0 full speed compatible interface which is used for PC communication. The device also includes a fully integrated high speed oscillator which is used as clock source for the USB and UART baud rate generator. The baud rate generator can support up to 115200bps of baud rate for the UART interface.

Transcript of HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge —...

Page 1: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 1 December 27, 2017 Rev. 1.00 PB December 27, 2017

HT42B564-x

USB (HID) to UART Bridge IC

USB Bridge IC Naming Rules

HT42B 5 6 4 - xProduct Family

HT42B = Holtek Bridge IC

Bridge Series of Host

5 = USB

USB Class type

Version

1 = First Version

Bridge Series of Device

2 = I2C3 = SPI 4 = UART

3 = CDC Class6 = HID Class

Features• OperatingVoltage(VDD):3.3V~5.5V• UARTpinVoltage(VDDIO):1.8V~VDD(LessthanVDDvoltage)

• Powerdownandwake-upfunctionstoreducepowerconsumption

• Fullyintegrated12MHzoscillatorwith0.25%accuracyforallUSBmodeswhichrequiresnoexternalcomponents

• USBinterface ♦ USB2.0FullSpeedcompatible ♦ ImplementsUSBHumanInterfaceDevice(HID)class

♦ Internal1.5kΩpull-highresistoronD+pin

• Fully-duplexUniversalAsynchronousReceiverandTransmitterInterface–UART ♦ SupportsBaudRateupto115200bps ♦ Supportsmaximum32bytestransmitbufferand32bytesreceivebuffer

♦ UARTDataformatssupported:– Databits:8– Stopbits:1and2– Parity:odd,even,noparity

♦ SupportsRXpinresumesignaltorequestaremotewake-up

♦ SupportsVDDIOpinforUARTpinspowersupply

• SupportsstandardWindows®driversforWindowsXP,Vista,Win7,Win8/8.1,Win10

• Packagetypes:10-pinSOP

General DescriptionTheHT42B564-xdeviceisahighperformanceUSBtoUARTbridge controllerwith fully integratedUSBandUART interface functions, designed forapplications that communicatewithvarious typesofUART.The device includes aUSB 2.0 fullspeed compatible interfacewhich is used forPCcommunication.Thedevice also includes a fullyintegratedhighspeedoscillatorwhichisusedasclocksourcefor theUSBandUARTbaudrategenerator.Thebaudrategeneratorcansupportupto115200bpsofbaudratefortheUARTinterface.

Page 2: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 2 December 27, 2017

HT42B564-x

Selection TableMostfeaturesarecommontoalldevices.Thefollowingtablesummarisesthemainfeaturesofeachdevice.

Part No. Description VDD USB VirtualCOM HID FIFO/Buffer Interface

Data RateI/O

VDD Package

HT42B532-x USB to I2CBridge

3.3V~5.5V Full-Speed

√ — TX: 62 bytesRX: 62 bytes Up to 400kHz √ 8SOP

10MSOP

HT42B533-x USB to SPIBridge √ — TX: 128 bytes

RX: 128 bytes Up to 8MHz √ 10MSOP16NSOP

HT42B534-x USB to UART Bridge √ — TX: 128 bytes

RX: 128 bytesUp to 3Mbps

Baud √8/10SOP10MSOP16NSOP

HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes

RX: 32 bytesUp to 115.2kbps

Baud √ 10SOP

Block Diagram

3.3VRegulator

BaudRate

Generator

UART32BRX

Buffer

USB PHY

InternalOscillator

ExternalMCU/UARTcircuitry

TXRX

D+

D-

VDD

GND

HT42B564-x USB to UART Bridge

V33O

VDDIO

DevicePower

32BTX

BufferUSBController LED

UDET

Pin Assignment109876

12345

V33OGND

TX VDDIORX

D-D+VDD

LED UDET

HT42B564-x10 SOP-A

Package Type Marking10SOP HT42B564-x

Note:x=1forversionnumber.

Page 3: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 3 December 27, 2017

HT42B564-x

Pin DescriptionPin Name Type Description

D+ I/O USB D+ LineD- I/O USB D- LineTX O Asynchronous data output – UART TransmitRX I Asynchronous data input – UART ReceiveLED O TX/RX signal LED indication, active lowUDET I USB plug-in/out detect pinV33O O 3.3V regulator outputVDDIO PWR Positive power supply for TX/RX pinsVDD PWR Positive power supply, USB bus powerGND PWR Negative power supply, ground

Absolute Maximum RatingsSupplyVoltage...........................VSS-0.3VtoVSS+6.0VInputVoltage.............................VSS-0.3VtoVDD+0.3VStorageTemperature.......................... -55°Cto150°COperatingTemperature........................ -40°Cto85°C

IOHTotal........................................................... -80mAIOLTotal..............................................................80mATotalPowerDissipation..................................500mW

Note:Thesearestressratingsonly.Stressesexceedingtherangespecifiedunder"AbsoluteMaximumRatings"maycausesubstantialdamagetothesedevices.Functionaloperationofthesedevicesatotherconditionsbeyondthoselistedinthespecificationisnotimpliedandprolongedexposuretoextremeconditionsmayaffectdevicesreliability.

D.C CharacteristicsTa=25°C

Symbol ParameterTest Conditions

Min. Typ. Max. UnitVDD Conditions

VDD Operating Voltage — — 3.3 — 5.5 VVDDIO UART Pins VDDIO input voltage — — 1.8 — VDD VIDD Operating Current 5V No load, USB Plug-in — 11 16 mA

ISUS Suspend Current – USB 5V Suspend mode, No load, USB on, other peripherals off — 360 450 μA

ISTB Standby Current – Non-USB 3VStandby mode, No load, USB Plug-out, other peripherals off,VDD power from VDDIO

— 0.1 1.0 μA

VIL Input Pin Input Low Voltage — — 0 — 0.2VDDIO VVIH Input Pin Input High Voltage — — 0.8VDDIO — VDDIO V

IOL I/O Pin Sink Current3V

VOL = 0.1VDDIO4 8 — mA

5V 10 20 — mA

IOH I/O Pin Source Current 3V

VOH = 0.9VDDIO-2 -4 — mA

5V -5 -10 — mA

RPH I/O Pin Pull-high Resistance 3V — 20 60 100 kΩ5V — 10 30 50 kΩ

ILEAK Input Leakage Current3V

VIN = VDD or VIN = VSS— — ±1 μA

5V — — ±1 μAVV33O 3.3V Regulator Output Voltage 5V IV33O = 70mA 3.0 3.3 3.6 V

RUDP1Pull-high Resistance between D+ and V33O 3.3V — -5% 1.5 +5% kΩ

Page 4: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 4 December 27, 2017

HT42B564-x

A.C CharacteristicsTa=25°C

Symbol ParameterTest Condition

Min. Typ. Max. UnitVDD Condition

fHIRC High Speed Internal RC Oscillator 3.3V~5.5V USB mode -0.25% 12 +0.25% MHz

tSST System Start-up Timer Period — RX pin Wake-up from power down mode 16 — — tHIRC

tRSTD System Reset Delay Time — Power-on reset 25 50 100 ms

Power-on Reset CharacteristicsTa=25°C

Symbol ParameterTest Conditions

Min. Typ. Max. UnitVDD Conditions

VPOR VDD Start Voltage to Ensure Power-on Reset — — — — 100 mV

RRPOR VDD Rising Rate to Ensure Power-on Reset — — 0.035 — — V/ms

tPORMinimum Time for VDD Stays at VPOR to Ensure Power-on Reset — — 1 — — ms

VDD

tPOR RRPOR

VPOR

Time

Page 5: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 5 December 27, 2017

HT42B564-x

USB InterfaceThe USB interface, being USB 2.0 full-speedcompatible, is a 4-wire serial bus that allowscommunicationbetweenahostdeviceandupto127maxperipheral devices on the samebus.A tokenbasedprotocolmethodisusedbythehostdeviceforcommunicationcontrol.OtheradvantagesoftheUSBbusincludelivepluggingandunplugginganddynamicdeviceconfiguration.AsthecomplexityofUSBdataprotocoldoesnotpermitcomprehensiveUSBoperationinformationtobeprovidedinthisdatasheet,thereadershouldthereforeconsultotherexternalinformationforadetailedunderstandingoftheUSBinterface.

Power PlanesThereare twopowerplanesfor thedeviceandtheyare theUSB bus power input (VDD) and 3.3Vregulatoroutput(V33O).FortheUSBSIE,VDDwillsupplyallcircuitsrelatedto theUSBSIEandbe sourced frompin "VDD".OncetheUSBdeviceisremovedfromtheUSBbusandthereisnopowerontheUSBBUS,theUSBSIEcircuitwillnolongerbeoperational.

USB Interface OperationTocommunicatewith an externalUSBhost, theinternalUSBmodulehasexternalpinsknownasD+andD-alongwith the3.3VregulatoroutputV33O.ASerialInterfaceEngine,SIE,decodestheincomingUSBdata stream and transfers it to the correctendpointbuffermemoryknownas theFIFO.TheUSBmodulehas3endpoints,EP0~EP2.Endpoint0supports theControl transferwhileendpoint1~endpoint2support theInterrupt.TheHT42B564-xBridgeICsupportstheUSBHumanInterfaceDeviceClass,HID,forcommunication.

Endpoint Transfer Type0 Control1 Interrupt In2 Interrupt Out

USB Endpoint Transfer Type

IfthereisnosignalontheUSBbusforover3ms,theUSBdevicewillenterthesuspendmode.Thedeviceenters thesuspendstatetomeet therequirementsoftheUSBsuspendcurrent specification.When theresumesignalisassertedbytheUSBhost,thedevicewillbewokenupandleavethesuspendmode.AstheUSBdevicehasaremotewake-upfunction,theUSBdevicecanbewoken-up theUSBhostbysendingaremotewake-uppulse.OncetheUSBhostreceives a remotewake-up signal from theUSBdevice, thehostwill send a resume signal to thedevice.

USB VID and PID ConfigurationThedevicehasconfiguredthedefaultVendorID(VID:0x04D9),Product ID (PID:0xB564)andproductdescriptionstringsof"USBHIDUARTBridge".ThisdevicehasbeenconfiguredtothedefaultUSBconfigurationdataasshowninthefollowingtable.

Parameter Value (hex)USB Vendor ID (VID) 0x04D9USB Product ID (PID) 0xB564Remote wake-up Default enableManufacturer Name HoltekProduct Description USB HID UART BridgeSerial Number 0000

USB Data FormatReadData:32bytesFIFOforeachreaddata,thefirstbytevalid for thisnumberofdata length received,rangesfrom0to31.Iftherearemorethan31bytesofdata,itwillbedividedintomultipletimesread.WriteData:32bytesFIFO for eachwritedata tobewrittenfirstbytenumber, rangingfrom0 to31.If therearemore than31bytes thenwritemultipletimes.

Page 6: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 6 December 27, 2017

HT42B564-x

UART InterfaceTheHT42B564-xcontainsanintegratedfull-duplexasynchronousserialcommunicationsUARTinterfacethatenablescommunicationwithexternaldevicesthatcontainaserial interface.TheUARTfunctionhasmanyfeaturesandcantransmitandreceivedataseriallybytransferringaframeofdatawitheightdatabitsper transmissionaswellasbeingable todetecterrorswhen thedata isoverwrittenor incorrectlyframed.TheUART function possesses its owninternalinterruptwhichcanbeusedtoindicatewhenareceptionoccursorwhenatransmissionterminates.TheintegratedUARTfunctioncontainsthefollowingfeatures:• Full-duplex,asynchronouscommunication• 8bitscharacterlength• Even,oddornoparityoptions• Oneortwostopbits• Baudrategeneratorwithprescaler• 32-byteDeepFIFOTransmitDataBuffer• 32-byteDeepFIFOReceiveDataBuffer• RXpinwake-upfunction• UARTpinspowersupplybyVDDIOpin

UART External PinsTocommunicatewithanexternal serial interface,the internalUARThas twoexternalpinsknownasTXandRX.TheTXandRXpins are theUARTtransmitterandreceiverpinsrespectively.

UART Data Transfer SchemeThedatawillbe transferred to theTransmitShiftRegisterfromwhereitwillbeshiftedout,LSBfirst,onto theTXpin at a rate controlledby theBaudRateGenerator.Data tobe receivedby theUARTisacceptedontheexternalRXpin,fromwhereit isshifted in,LSBfirst, to theReceiverShiftRegisterat a rate controlledby theBaudRateGenerator.TheUARTinterfaceprovidesa32bytedeepFIFOtransmitdatabufferanda32bytedeepFIFOreceivedatabufferforapplications.

Fordata transfer, theUARTfunctionutilisesanon-return-to-zero,more commonly known asNRZ,format.Thisiscomposedofonestartbit,eightdatabitsandoneor twostopbits.ParityissupportedbytheUARThardwareandcanbesetuptobeeven,oddornoparity.Forthemostcommondataformat,8databitsalongwithnoparityandonestopbit,denotedas8,N,1,isusedasthedefaultsetting,whichisthesettingatpower-on.Thefollowingdiagramshowsthetransmitandreceivewaveformsfor8-bitdataformat.

Baud Rate GeneratorTosetupthespeedoftheserialdatacommunication,theUART function contains its own dedicatedbaudrategenerator.ThedefaultUARTbaudrate is9600bpsand itcanbecontrolledby theapplicationprogram.Thebaudrateandmissratetable:

Baud Rate Real Rate Miss Rate (%)9600 9603.841537 0.0419200 19207.68307 0.0438400 38461.53846 0.1657600 57692.30769 0.16115200 115384.6154 0.16

UART Power Down and Wake-upIf theUSB host sends a suspend signal to theHT42B564-xUSBdevice, itwillenter thesuspendmode. It is recommended toensure that theUARTdatatransmissionorreceptionhasfinishedbeforethedeviceentersthesuspendmode.TheUARTfunctioncontainsareceiverRXpinwake-upfunction.AfallingedgeontheRXpinwillwakeupthedevicefromthesuspendmode.

Bit 0

8-bit Data Format

Bit 1 StopBit

Next StartBit

StartBit

Parity Bit

Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7

Page 7: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 7 December 27, 2017

HT42B564-x

USB HID Protocol

USB VID/PIDVID:0x04D9PID:0xB564

USB TO UART CommandTheapplicationprogramusesUSBHIDset/get featurecommand to implementUARTsettings.Therearefollowingcommand:• GetUARTSettingCommand• SetUARTSettingCommand(CMDCode=01)

Get UARTSetting Command

Request Name Report Type Raw DataGet_Report Feature D0~D7

D1~D8:UARTSettings(RefertoTable)

Byte Field Size DescriptionD0 CMDCode 1 Command code.

D1~D4 DTERate 4

Data terminal rate,in bits per second. (support 9600/19200/38400/57600/115200) 9600 → 80 25 00 00 19200 → 00 4B 00 00 38400 → 00 96 00 00 57600 → 00 E1 00 00 115200 → 00 C2 01 00

D5 CharFromat 1Stop bits 0-1 Stop bits 1-2 Stop bits

D6 ParityType 1

Parity 0-None 1-Odd 2-Even

D7 DataBits 1 Data bits(only 8)

UARTSettings

Set UARTSetting Command

Request Name Report Type Raw DataSet_Report Feature D0~D7

D0~D7:UARTSettings(RefertoTable.1)CMDCode=01H

Write Data

Request Name Report Type Raw DataInterrupt Output D0~D31

Endpointsize32bytesThefirstdataofD0isthedatalength.

Read Data

Request Name Report Type Raw DataInterrupt Input D0~D31

Endpointsize32bytesThefirstdataofD0isthedatalength.

Page 8: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 8 December 27, 2017

HT42B564-x

DLL Function

HT42B564-x USB Bridge DLL FunctionHoltekprovidesaDynamic-LinkLibrary (DLL) tosetuptheHT42B564-xBridgeICforUSBtoUARTdatacommunication.TheDynamic-link libraryDLL isa shared libraryof functionexecutable files, available indifferentlanguagesforapplicationcalls touse.ThecomplexcomputingandcommunicationsUSBiscollatedintoa"HIDAPI.DLL".UserscanusethisDLLtodevelopdifferentclientapplicationswithouthavingtospendexcessiveamountsof time tostudyandwriteUSBrelatedfunctions.

DLL Function Definition:BOOLSetFeature(HANDLEhDevice,LPVOIDpData,DWORDnLen);BOOLGetFeature(HANDLEhDevice,LPVOIDpData,DWORDnLen);HANDLEOpenFirstHIDDevice(DWORDdwVID,DWORDdwPID,DWORDdwUsagePage,DWORDdwUsage,BOOLbSync);HANDLEOpenNextHIDDevice(DWORDdwVID,DWORDdwPID,DWORDdwUsagePage,DWORDdwUsage,BOOLbSync);voidCloseHIDDevice(HANDLEhDevice);

Usage – Taking C language as an example:• HINSTANCEhLib=LoadLibrary("HIDAPI.DLL");• TheGetProcAddressfunctionfetchestheaddressesforaccessingvariousfunctionsTakingClanguageasanexample,thedeclarationsareasfollows:BOOL(*SetFeature)(HANDLEhDevice,LPVOIDpData,DWORDnLen);BOOL(*GetFeature)(HANDLEhDevice,LPVOIDpData,DWORDnLen);HANDLE (*OpenFirstHIDDevice)(DWORDwVID,DWORDwPID,DWORDwUsagePage,DWORDwUsage,BOOLbSync);HANDLE (*OpenNextHIDDevice)(DWORDwVID,DWORDwPID,DWORDwUsagePage,DWORDwUsage,BOOLbSync);void(*CloseHIDDevice)(HANDLEhDevice);

Gettheaddresses(FARPROC&)OpenFirstHIDDevice=GetProcAddress(m_hLib,"OpenFirstHIDDevice");(FARPROC&)OpenNextHIDDevice=GetProcAddress(m_hLib,"OpenNextHIDDevice");(FARPROC&)CloseHIDDevice=GetProcAddress(m_hLib,"CloseHIDDevice");(FARPROC&)SetFeature=GetProcAddress(m_hLib,"SetFeature");(FARPROC&)GetFeature=GetProcAddress(m_hLib,"GetFeature");

Function Description:HANDLEOpenFirstHIDDevice(DWORDwVID,DWORDwPID,DWORDwUsagePage,DWORDwUsage,BOOLbSync);HANDLEOpenNextHIDDevice(DWORDwVID,DWORDwPID,DWORDwUsagePage,DWORDwUsage,BOOLbSync);Parameters:wVID DeviceVendorID.AnyVIDinputwillbe regardedastheHoltekVendorID0x04D9 bydefault in this version.Consultwith HoltekifanotherVIDisrequired.wPID DeviceProductID.wUsagePage/wUsage

TheUsagePage/Usage adopted by theReportDescriptorwillbewrittenwithavalueof "0" if it is not specified.MoredetailedinformationiscontainedintheHIDspec.WhenthesameVID/PIDhasmultipleinterfaces simultaneously, it is requiredto specify the exactUsagePage/Usage,otherwiseonly the first interfacehandlevaluewillbereturned.

bSync Usesynchronousorasynchronoustransmission. Synchronous transmissionmeans that the functionwillnot returnavalueuntil the Input/Outputhasfinished.

Return Value:Representsthevalueoftheactivateddevice.ANULLwillbereturnediftheopenoperationhasfailed.WhenthesameVID/PIDUSBdevicesexistsimultaneously,theOpenFirstHIDDevicefunctioncanbeusedtoopenthefirstonefollowedbyanOpenNextHIDDevicefunctiontoopenthenextoneuntilaNULLisreturned.Afteractivation,thedeviceisabletoexecuteReadFile/WriteFileoperations,whichare theWindowsAPIStandardFunctions.

Page 9: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 9 December 27, 2017

HT42B564-x

Void CloseHIDDevice(HANDLE hDevice);Parameters:hDevice Represents thevalueof thedevice tobeclosed.

BOOL SetFeature(HANDLE hDevice, LPVOID pData, DWORD nLen)Parameters:hDevice RepresentsthevalueoftheactivateddevicepData Databufferwhere theFeaturedata is to bewritten.ThefirstbyteshouldbeReport ID.A"0"valuewillbewrittentothisbyte ifthereisnoReportID.nLen Lengthof theFeaturedata tobewritten. TherequiredlengthshouldbetheFirmware- definedFeatureReport lengthwith the additionofoneReportIDbyte.Returnvalue: 1:Writesuccess 0:Writefail

BOOL GetFeature(HANDLE hDevice, LPVOID pData, DWORD nLen);Returnvalue:hDevice RepresentsthevalueoftheactivateddevicepData DatabufferwheretheFeaturedataisto beread.ThefirstbyteshouldbeReport ID.A"0"valuewillbewrittentothisbyte ifthereisnoReportID.nLen LengthoftheFeaturedatatoberead. Therequiredlengthshouldbethe Firmware-definedFeatureReportlength withtheadditionofoneReportIDbyte.Returnvalue: 1:Readsuccess 0:Readfail

Considerations:• TheOpenFirstHIDDevice/OpenNextHIDDevicefunctions start updeviceswith a readable andwriteablepermission,thereforethedevicespecifiedby theVID/PID should also be readable andwritable.Thismeans that the FirmwaremustprovideOutputReport/InputReportorInterruptIN/InterruptOUT.

• Use general f i le access functions, such asWriteFile(hDevice,…)intheClanguagetowritedata toOutputReport or InterruptOUT.Therequired data length should be theFirmware-definedOutputReport lengthwith the additionofoneReportIDbyte.ThefirstbytemustbetheReportID.Itwillbe"0"ifthereisnoReportID.

• Use general fi le access functions, such asReadFile(hDevice,…)intheClanguage, toreaddatafromInputReportorInterruptIN.Therequireddata length should be the Firmware-definedInputReportlengthwiththeadditionofoneReportIDbyte.Thefirstbytemustbe theReport ID.Itwillbe"0"ifthereisnoReportID.

• Touse theSetFeature/GetFeature functions, thedevicemustprovideFeatureReport,whichmeanstheReportDescriptor of theFirmware shouldcontaintheFeatureType.

Page 10: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 10 December 27, 2017

HT42B564-x

Application Circuits

VDD

GND

V33O

D-D+

VDDIO

1µF

VBUSD-D+

VSS

0.1µF10µF

47pF 47pF

33Ω

33Ω

0.1µF

VDD

MCUApplication

Circuit

HT42B564-x10 SOP-A

USB Connector

3.3VBAT

TX

RXUDET

LED

VCC

1N5817

5V or 3.3V

3.3V

0.1µF

VDD330Ω

LED

TX

RXUART

Note:1.TheVCCvoltagemustbelessthantheVDDvoltage.TheVCCsupplycanbesourcedfromaLi-battery.2.TheUDETpincanusedtodetectaUSBplug-infordatatransferortodetectaUSBplug-outforenteringtheenergysavingmode.

Page 11: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 11 December 27, 2017

HT42B564-x

Package Information

Notethat thepackageinformationprovidedhereisforconsultationpurposesonly.Asthis informationmaybeupdatedatregularintervalsusersareremindedtoconsulttheHoltekwebsiteforthelatestversionofthePackage/CartonInformation.

Additionalsupplementaryinformationwithregardtopackagingislistedbelow.Clickontherelevantsectiontobetransferredtotherelevantwebsitepage.

• FurtherPackageInformation(includeOutlineDimensions,ProductTapeandReelSpecifications)

• PackingMeterialsInformation

• Cartoninformation

Page 12: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 12 December 27, 2017

HT42B564-x

10-pin SOP (150mil) Outline Dimensions

SymbolDimensions in inch

Min. Nom. Max.A — 0.236 BSC —B — 0.154 BSC —C 0.012 — 0.018C’ — 0.193 BSC —D — — 0.069E — 0.039 BSC —F 0.004 — 0.010G 0.016 — 0.050H 0.004 — 0.010α 0° — 8°

SymbolDimensions in mm

Min. Nom. Max.A — 6.00 BSC —B — 3.90 BSC —C 0.30 — 0.45C’ — 4.90 BSC —D — — 1.75E — 1.00 BSC —F 0.10 — 0.25G 0.40 — 1.27H 0.10 — 0.25α 0° — 8°

Page 13: HT42B564-x USB (HID) to UART Bridge IC · 2018-01-11 · HT42B564-x USB (HID) to UART Bridge — √ TX: 32 bytes RX: 32 bytes Up to 115.2kbps Baud √ 10SOP Block Diagram 3.3V Regulator

Rev. 1.10 13 December 27, 2017

HT42B564-x

Copyright© 2016 by HOLTEK SEMICONDUCTOR INC.

The information appearing in this Data Sheet is believed to be accurate at the time of publication. However, Holtek assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise. Holtek's products are not authorized for use as critical components in life support devices or systems. Holtek reserves the right to alter its products without prior notification. For the most up-to-date information, please visit our web site at http://www.holtek.com.tw/en/home.