TWI420888B - System and method for detecting usb port of a mobile phone - Google Patents

System and method for detecting usb port of a mobile phone Download PDF

Info

Publication number
TWI420888B
TWI420888B TW98111244A TW98111244A TWI420888B TW I420888 B TWI420888 B TW I420888B TW 98111244 A TW98111244 A TW 98111244A TW 98111244 A TW98111244 A TW 98111244A TW I420888 B TWI420888 B TW I420888B
Authority
TW
Taiwan
Prior art keywords
voltage
charging
mobile phone
port
storage structure
Prior art date
Application number
TW98111244A
Other languages
Chinese (zh)
Other versions
TW201038047A (en
Inventor
Chih Chieh Chang
Original Assignee
Chi Mei Comm Systems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chi Mei Comm Systems Inc filed Critical Chi Mei Comm Systems Inc
Priority to TW98111244A priority Critical patent/TWI420888B/en
Publication of TW201038047A publication Critical patent/TW201038047A/en
Application granted granted Critical
Publication of TWI420888B publication Critical patent/TWI420888B/en

Links

Description

手機USB埠偵測系統及方法Mobile phone USB port detection system and method

本發明涉及一種偵測系統及方法,尤其涉及一種手機USB埠偵測系統及方法。The present invention relates to a detection system and method, and more particularly to a mobile phone USB port detection system and method.

在使用晶片於手機軟體發展時,常見的外插式裝置如通用串列匯流排(USB,Universal Serial Bus)在插入拔出動作未能正確被裝置偵測出,導致手機的誤操作發生,容易產生產品故障或使用者因為使用經驗不足導致的嚴重後果。一般常見的問題包括USB模式無法正確被讀取,手機無法存取儲存卡的資料,導致檔案存檔功能無法正常工作,更有可能造成手機誤判插入拔出狀態,導致手機死機,功能異常等現象。When using a chip for mobile phone software development, a common external plug-in device such as a universal serial bus (USB, Universal Serial Bus) is not correctly detected by the device when the insertion and removal operation is performed, resulting in a malfunction of the mobile phone, which is easy to occur. Product failure or serious consequences of the user due to lack of experience. Common problems include the USB mode cannot be read correctly, the mobile phone cannot access the data of the memory card, and the file archiving function cannot work normally. It is more likely that the mobile phone will be mistakenly inserted and removed, resulting in the crash of the mobile phone and abnormal functions.

鑒於以上內容,有必要提供一種手機USB埠偵測系統及方法,可以有效地偵測到手機的USB埠的即時狀態。In view of the above, it is necessary to provide a mobile phone USB port detection system and method, which can effectively detect the instant state of the USB port of the mobile phone.

一種手機USB埠偵測系統,該系統運行於手機的晶片上,該手機的USB埠的電壓和充電埠的電壓相同,該晶片包括一個儲存結構,該儲存結構用於儲存手機與終端裝置的連接狀態,該系統包括:接收模組,用於接收USB埠的資料線所傳輸的訊號;電壓量測模組,用於當所述接收模組接收到所述資料線傳輸的訊號後,測量充電埠的電壓;記錄模組,用於若所測量的充電埠的電壓上升,則更新儲存結構中所儲存的連接狀態為插入中狀態;所述電壓量測模組,還用於每隔時間t測量一次充電埠的電壓;判斷模組,用於判斷該充電埠的電壓是否下降;所述記錄模組,還用於若所述充電埠的電壓沒有下降,且一定時間T’內不變,則更新儲存結構中所儲存的連接狀態為已插入狀態;及該記錄模組,還用於若所述充電埠的電壓下降,則更新儲存結構中儲存的連接狀態為拔出中狀態,若該充電埠的電壓下降後一定時間T’內電壓不變,則更新儲存結構中儲存的連接狀態為已拔出狀態。A mobile phone USB port detection system running on a chip of a mobile phone, the voltage of the USB port of the mobile phone being the same as the voltage of the charging port, the chip comprising a storage structure for storing the connection between the mobile phone and the terminal device The system includes: a receiving module, configured to receive a signal transmitted by a data line of the USB port; and a voltage measuring module configured to measure the charging after the receiving module receives the signal transmitted by the data line a voltage of the ;; a recording module, configured to update the connection state stored in the storage structure to an inserted state if the measured voltage of the charging strobe rises; the voltage measuring module is further used for every time t Measuring a voltage of the charging port; determining a module for determining whether the voltage of the charging port is decreased; and the recording module is further configured to: if the voltage of the charging port does not decrease, and the constant time T′ does not change, And updating the connection state stored in the storage structure to the inserted state; and the recording module is further configured to: if the voltage of the charging port decreases, update the connection state stored in the storage structure to In the state, if the voltage drop after charging port of a certain time T 'the constant voltage, the updated connection state stored in the storage structure is unplugged state.

一種手機USB埠偵測方法,該方法包括如下步驟:(a)接收USB埠的資料線傳輸的訊號;(b)當接收到所述資料線傳輸的訊號後,測量充電埠的電壓,該充電埠的電壓與該手機USB埠的電壓相同;(c)若所測量的充電埠的電壓上升,則更新儲存結構中所儲存的連接狀態為插入中狀態;(d)每隔時間t測量一次充電埠的電壓,判斷在時間t所測得的充電埠的電壓是否下降,若該充電埠電壓沒有下降,進入步驟(e),若該充電埠電壓下降,則進入步驟(f);(e)當在一定時間T’內該電壓不變時,更新儲存結構中所儲存的連接狀態為已插入狀態,並轉至步驟(d);(f)更新儲存結構中儲存的連接狀態為拔出中狀態;(g)每隔時間t測量一次充電埠的電壓;及(h)若該充電埠的電壓下降後一定時間T’內電壓不變,則更新儲存結構中儲存的連接狀態為已拔出狀態。A method for detecting a USB port of a mobile phone, the method comprising the steps of: (a) receiving a signal transmitted by a data line of a USB port; (b) measuring a voltage of the charging port after receiving the signal transmitted by the data line, the charging The voltage of 埠 is the same as the voltage of the USB port of the mobile phone; (c) if the measured voltage of the charging port rises, the connection state stored in the storage structure is updated to the state of insertion; (d) the charging is measured every time t The voltage of 埠 determines whether the voltage of the charging 测 measured at time t decreases, and if the charging 埠 voltage does not decrease, proceeds to step (e), and if the charging 埠 voltage drops, proceeds to step (f); (e) When the voltage does not change within a certain time T', the connection state stored in the update storage structure is the inserted state, and the process proceeds to step (d); (f) the connection state stored in the storage structure is updated to be extracted. State; (g) measuring the voltage of the charging port every time t; and (h) if the voltage within the constant time T' does not change after the voltage of the charging port drops, updating the connection state stored in the storage structure to be pulled out status.

相較於習知技術,所述手機USB埠偵測系統及方法,利用充電埠與USB埠的電壓相同特點,透過充電電壓的變化偵測USB埠的連接狀態,並及時更新連接狀態,使得手機正確判斷插入拔出狀態。Compared with the prior art, the mobile phone USB port detection system and method utilize the same characteristics of the voltage of the charging port and the USB port, detect the connection state of the USB port through the change of the charging voltage, and update the connection state in time to make the mobile phone Correctly determine the insertion and removal status.

如圖1所示,係本發明手機USB埠偵測系統較佳實施例之運行環境圖。該手機USB埠偵測系統100運行於手機1的晶片10中,該手機1包括至少一個USB埠11和充電埠12,所述手機USB埠偵測系統100用於定時量測該充電埠12的電壓。需要指出的是,該USB埠11與該充電埠12相同,因此充電埠12的電壓即為該USB埠11的電壓。FIG. 1 is a diagram showing an operating environment of a preferred embodiment of the mobile phone USB port detection system of the present invention. The mobile phone USB port detection system 100 runs on the chip 10 of the mobile phone 1. The mobile phone 1 includes at least one USB port 11 and a charging port 12 for periodically measuring the charging port 12 Voltage. It should be noted that the USB port 11 is the same as the charging port 12, so the voltage of the charging port 12 is the voltage of the USB port 11.

所述手機1還可連接於一個終端裝置2,本較佳實施例中,該終端裝置2為電腦。所述手機1與終端裝置2的連接狀態包括已插入狀態,插入中狀態,拔出中狀態和已拔出狀態,該連接狀態儲存於晶片10中的一個儲存結構101中,該儲存結構101中只儲存有一種連接狀態。The mobile phone 1 can also be connected to a terminal device 2. In the preferred embodiment, the terminal device 2 is a computer. The connection state of the mobile phone 1 and the terminal device 2 includes an inserted state, an inserted state, an unplugged state, and an extracted state, and the connected state is stored in a storage structure 101 in the wafer 10, in the storage structure 101. Only one connection status is stored.

所述USB埠11包括資料線111,當所述手機1連接上所述終端裝置2時,所述資料線傳輸訊號給所述手機USB埠偵測系統100,該手機USB埠偵測系統100便執行偵測工作。The USB port 11 includes a data line 111. When the mobile phone 1 is connected to the terminal device 2, the data line transmits a signal to the mobile phone USB port detection system 100, and the mobile phone USB port detection system 100 Perform detection work.

如圖2所示,係圖1中手機USB埠偵測系統100之功能模組圖。所述模組是具有特定功能的軟體程式段,該軟體儲存於電腦可讀儲存介質或其他儲存設備,可被電腦或其他包含處理器的計算裝置執行,從而完成USB偵測的系列流程。所述USB偵測系統100包括:接收模組1000,電壓量測模組1001,判斷模組1002及記錄模組1003。As shown in FIG. 2, it is a functional module diagram of the mobile phone USB port detection system 100 in FIG. The module is a software program segment with a specific function. The software is stored in a computer readable storage medium or other storage device and can be executed by a computer or other computing device including a processor to complete a series of USB detection processes. The USB detection system 100 includes a receiving module 1000, a voltage measuring module 1001, a determining module 1002, and a recording module 1003.

接收模組1000用於當用戶將該手機1透過該USB埠11連接到所述終端裝置2上時,接收USB埠11的資料線111所傳輸的訊號。The receiving module 1000 is configured to receive a signal transmitted by the data line 111 of the USB port 11 when the user connects the mobile phone 1 to the terminal device 2 through the USB port 11.

電壓量測模組1001用於當所述接收模組1000接收到所述資料線111所傳輸的訊號後,測量充電埠12的電壓。The voltage measurement module 1001 is configured to measure the voltage of the charging port 12 after the receiving module 1000 receives the signal transmitted by the data line 111.

判斷模組1002用於判斷所述電壓量測模組1001所測量的充電埠12的電壓是否上升。The determining module 1002 is configured to determine whether the voltage of the charging port 12 measured by the voltage measuring module 1001 is rising.

記錄模組1003用於若所測量的充電埠12的電壓上升,判斷該手機1的連接狀態為插入中狀態,更新儲存結構101中所儲存的連接狀態為插入中狀態。The recording module 1003 is configured to determine that the connection state of the mobile phone 1 is in an inserted state when the measured voltage of the charging port 12 is increased, and update the connection state stored in the storage structure 101 to an inserted state.

所述電壓量測模組1001還用於每隔時間t測量充電埠12的電壓。在本較佳是實施例中,該t=4.615ms,即該電壓量測模組1001每隔4.615ms測量一次所述充電埠12的電壓。The voltage measurement module 1001 is further configured to measure the voltage of the charging port 12 every time t. In the preferred embodiment, the voltage measurement module 1001 measures the voltage of the charging port 12 every 4.615 ms.

所述判斷模組1002還用於判斷所述電壓量測模組1001每隔時間t所測量得到的電壓是否下降。The determining module 1002 is further configured to determine whether the voltage measured by the voltage measuring module 1001 every time t decreases.

所述判斷模組1002還用於當所述電壓量測模組1001測量到電壓沒有下降時,判斷一定時間T’內所述充電埠12的電壓是否不變。於本較佳實施例中,T’=0.3s。The determining module 1002 is further configured to determine whether the voltage of the charging port 12 does not change within a certain time T' when the voltage measuring module 1001 measures that the voltage has not decreased. In the preferred embodiment, T' = 0.3 s.

所述記錄模組1003還用於當所述充電埠12的電壓上升後沒有下降,且一定時間T’內該充電埠12的電壓不變時,則判斷該手機1的連接狀態為已插入狀態,更新儲存結構101中儲存的連接狀態為已插入狀態。The recording module 1003 is further configured to: when the voltage of the charging buffer 12 rises without falling, and the voltage of the charging buffer 12 does not change within a certain time T′, determine that the connection state of the mobile phone 1 is the inserted state. The connection state stored in the update storage structure 101 is the inserted state.

所述記錄模組1003還用於當所述電壓量測模組1001測量到所述電壓下降時,判斷該手機1的連接狀態為拔出中狀態,更新儲存結構101中所儲存的連接狀態為拔出中狀態。The recording module 1003 is further configured to: when the voltage measuring module 1001 measures the voltage drop, determine that the connection state of the mobile phone 1 is an unplugged state, and update the connection state stored in the storage structure 101 to Pull out the middle state.

所述記錄模組1003還用於當所述充電埠12的電壓下降後且一定時間T’內所述充電埠12的電壓不變,則所述記錄模組1003判斷該手機1的連接狀態為已拔出狀態,更新儲存結構101中儲存的連接狀態為已拔出狀態。The recording module 1003 is further configured to: when the voltage of the charging buffer 12 drops and the voltage of the charging buffer 12 does not change within a certain time T′, the recording module 1003 determines that the connection state of the mobile phone 1 is The state is removed, and the connection state stored in the update storage structure 101 is the extracted state.

如圖3所示,係本發明手機USB埠偵測方法較佳實施例之方法流程圖。FIG. 3 is a flow chart of a method for a preferred embodiment of the method for detecting a USB port of a mobile phone according to the present invention.

步驟S30,當用戶將該手機1透過該USB埠11連接到所述終端裝置2上時,接收模組1000接收USB埠11的資料線111所傳輸的訊號。In step S30, when the user connects the mobile phone 1 to the terminal device 2 through the USB port 11, the receiving module 1000 receives the signal transmitted by the data line 111 of the USB port 11.

步驟S31,所述接收模組1000在接收到所述資料線111傳輸的訊號後,所述電壓量測模組1001測量充電埠12的電壓。Step S31, after receiving the signal transmitted by the data line 111, the voltage measurement module 1001 measures the voltage of the charging port 12.

步驟S32,判斷模組1002判斷所測量的充電埠12的電壓是否上升。若所測量的充電埠12的電壓上升,則進入步驟S33。若所測量的充電埠12的電壓沒有上升,則結束流程。In step S32, the determining module 1002 determines whether the measured voltage of the charging port 12 has risen. If the measured voltage of the charging port 12 rises, the process proceeds to step S33. If the measured voltage of the charging port 12 does not rise, the flow ends.

步驟S33,記錄模組1003判斷該手機1的連接狀態為插入中狀態,更新儲存結構101中所儲存的連接狀態為插入中狀態,並進入步驟S34。In step S33, the recording module 1003 determines that the connection state of the mobile phone 1 is in the inserted state, and updates the connection state stored in the storage structure 101 to the inserted state, and proceeds to step S34.

步驟S34,電壓量測模組1001每隔時間t測量充電埠12的電壓。在本較佳是實施例中,該t=4.615ms,即該電壓量測模組1001每隔4.615ms測量一次所述充電埠12的電壓。In step S34, the voltage measurement module 1001 measures the voltage of the charging port 12 every time t. In the preferred embodiment, the voltage measurement module 1001 measures the voltage of the charging port 12 every 4.615 ms.

步驟S35,判斷模組1002判斷所述電壓量測模組1001每隔時間t所測量得到的電壓是否下降。若所測量的電壓下降,則進入步驟S38。若所測量的電壓沒有下降,則進入步驟S36。In step S35, the determining module 1002 determines whether the voltage measured by the voltage measuring module 1001 every time t decreases. If the measured voltage drops, the process proceeds to step S38. If the measured voltage has not decreased, the process proceeds to step S36.

步驟S36,所述判斷模組1002判斷一定時間T’內所述充電埠12的電壓是否不變。於本較佳實施例中,T’=0.3s。當一定時間T’內所述充電埠12的電壓不變時,進入步驟S37。當所述一定時間T’內所述充電埠12的電壓改變,則轉至步驟S34。In step S36, the determining module 1002 determines whether the voltage of the charging port 12 is constant within a certain time T'. In the preferred embodiment, T' = 0.3 s. When the voltage of the charging cassette 12 does not change within a certain period of time T', the flow proceeds to step S37. When the voltage of the charging cassette 12 changes within the certain time T', the process goes to step S34.

步驟S37,所述記錄模組1003判斷該手機1的連接狀態為已插入狀態,更新儲存結構101中儲存的連接狀態為已插入狀態,並轉至步驟S34。In step S37, the recording module 1003 determines that the connection state of the mobile phone 1 is the inserted state, and the connection state stored in the update storage structure 101 is the inserted state, and the process goes to step S34.

步驟S38,所述記錄模組1003判斷該手機1的連接狀態為拔出中狀態,更新儲存結構101中所儲存的連接狀態為拔出中狀態。In step S38, the recording module 1003 determines that the connection state of the mobile phone 1 is in the unplugged state, and updates the connection state stored in the storage structure 101 to the unplugged state.

步驟S39,所述電壓量測模組1001每隔時間t測量充電埠12的電壓。In step S39, the voltage measuring module 1001 measures the voltage of the charging port 12 every time t.

步驟S40,判斷模組1002判斷一定時間T’內所述充電埠12的電壓是否不變。於本較佳實施例中,T’=0.3s。當一定時間T,內所述充電埠12的電壓不變時,進入步驟S41。當一定時間T’內所述充電埠12的電壓改變時,即該電壓上升,則轉至步驟S42。In step S40, the determination module 1002 determines whether the voltage of the charging port 12 does not change within a certain time T'. In the preferred embodiment, T' = 0.3 s. When the voltage of the charging cassette 12 does not change for a certain period of time T, the process proceeds to step S41. When the voltage of the charging port 12 changes within a certain period of time T', that is, the voltage rises, the process goes to step S42.

步驟S41,所述記錄模組1003判斷該手機1的連接狀態為已拔出狀態,更新儲存結構101中儲存的連接狀態為已拔出狀態。In step S41, the recording module 1003 determines that the connection state of the mobile phone 1 is the extracted state, and the connection state stored in the update storage structure 101 is the extracted state.

步驟S42,所述判斷模組1002判斷所述一定時間T’內充電埠12的電壓是否上升。若該充電埠12的電壓上升,轉至步驟S33。若該充電埠12的電壓下降,轉至步驟S39。In step S42, the determining module 1002 determines whether the voltage of the charging port 12 rises during the predetermined time T'. When the voltage of the charging port 12 rises, the process goes to step S33. If the voltage of the charging port 12 drops, the process goes to step S39.

以上所述僅為本發明之較佳實施例而已,且已達廣泛之使用功效,凡其他未脫離本發明所揭示之精神下所完成之均等變化或修飾,均應包含在下述之申請專利範圍內。The above is only the preferred embodiment of the present invention, and has been used in a wide range of applications. Any other equivalent changes or modifications which are not departing from the spirit of the present invention should be included in the following claims. Inside.

1...手機1. . . Mobile phone

2...終端裝置2. . . Terminal device

10...晶片10. . . Wafer

11...USB埠11. . . USB埠

12...充電埠12. . . Charging

100...手機USB埠偵測系統100. . . Mobile phone USB port detection system

101...儲存結構101. . . Storage structure

111...資料線111. . . Data line

1000...接收模組1000. . . Receiving module

1001...電壓量測模組1001. . . Voltage measurement module

1002...判斷模組1002. . . Judging module

1003...記錄模組1003. . . Recording module

S30...接收USB埠的資料線所發送的訊號S30. . . Receive the signal sent by the USB cable

S31...測量充電埠的電壓值S31. . . Measuring the voltage value of the charging port

S32...充電埠的電壓是否上升?S32. . . Does the voltage of the charging device rise?

S33...更新儲存結構中所儲存的連接狀態為插入中狀態S33. . . Update the storage state stored in the storage structure to the inserted state

S34...每隔時間t測量一次充電埠的電壓值S34. . . Measuring the voltage value of the charging ces every time t

S35...充電埠的電壓是否下降?S35. . . Is the voltage of the charging device falling?

S36...一定時間T’內所述充電埠的電壓值是否不變?S36. . . Is the voltage value of the charging port constant within a certain time T'?

S37...更新儲存結構中所儲存的連接狀態為已插入狀態S37. . . Update the storage state stored in the storage structure to the inserted state

S38...更新儲存結構中所儲存的連接狀態為拔出中狀態S38. . . Update the storage state stored in the storage structure to the unplugged state

S39...每隔時間t測量一次充電埠的電壓值S39. . . Measuring the voltage value of the charging ces every time t

S40...一定時間T’內充電埠的電壓值是否不變?S40. . . Is the voltage value of the charging T in a certain time T' unchanged?

S41...更新儲存結構中所儲存的連接狀態為已拔出狀態S41. . . Update the storage state stored in the storage structure to the extracted state

S42...該充電埠的電壓值是否上升?S42. . . Does the voltage value of the charging port rise?

圖1係本發明手機USB埠偵測系統較佳實施例之運行環境圖。1 is a diagram showing the operating environment of a preferred embodiment of the mobile phone USB port detection system of the present invention.

圖2係圖1中手機USB埠偵測系統100之功能模組圖。2 is a functional block diagram of the mobile phone USB port detection system 100 of FIG.

圖3係本發明手機USB埠偵測方法較佳實施例之方法流程圖。3 is a flow chart of a method for a preferred embodiment of the method for detecting a USB port of a mobile phone according to the present invention.

S30...接收USB埠的資料線所發送的訊號S30. . . Receive the signal sent by the USB cable

S31...測量充電埠的電壓值S31. . . Measuring the voltage value of the charging port

S32...充電埠的電壓是否上升?S32. . . Does the voltage of the charging device rise?

S33...更新儲存結構中所儲存的連接狀態為插入中狀態S33. . . Update the storage state stored in the storage structure to the inserted state

S34...每隔時間t測量一次充電埠的電壓值S34. . . Measuring the voltage value of the charging ces every time t

S35...充電埠的電壓是否下降?S35. . . Is the voltage of the charging device falling?

S36...一定時間T’內所述充電埠的電壓值是否不變?S36. . . Is the voltage value of the charging port constant within a certain time T'?

S37...更新儲存結構中所儲存的連接狀態為已插入狀態S37. . . Update the storage state stored in the storage structure to the inserted state

S38...更新儲存結構中所儲存的連接狀態為拔出中狀態S38. . . Update the storage state stored in the storage structure to the unplugged state

S39...每隔時間t測量一次充電埠的電壓值S39. . . Measuring the voltage value of the charging ces every time t

S40...一定時間T’內充電埠的電壓值是否不變?S40. . . Is the voltage value of the charging T in a certain time T' unchanged?

S41...更新儲存結構中所儲存的連接狀態為已拔出狀態S41. . . Update the storage state stored in the storage structure to the extracted state

S42...該充電埠的電壓值是否上升?S42. . . Does the voltage value of the charging port rise?

Claims (6)

一種手機USB埠偵測系統,該系統運行於手機的晶片上,該手機的USB埠的電壓和充電埠的電壓相同,該晶片包括一個儲存結構,該儲存結構用於儲存手機與終端裝置的連接狀態,該系統包括:接收模組,用於接收USB埠的資料線所傳輸的訊號;電壓量測模組,用於當所述接收模組接收到所述資料線傳輸的訊號後,測量充電埠的電壓;記錄模組,用於若所測量的充電埠的電壓上升,則更新儲存結構中所儲存的連接狀態為插入中狀態;所述電壓量測模組,還用於每隔時間t測量一次充電埠的電壓;判斷模組,用於判斷該充電埠的電壓是否下降;所述記錄模組,還用於若所述充電埠的電壓沒有下降,且一定時間T’內不變,則更新儲存結構中所儲存的連接狀態為已插入狀態;及該記錄模組,還用於若所述充電埠的電壓下降,則更新儲存結構中儲存的連接狀態為拔出中狀態,若該充電埠的電壓下降後一定時間T’內電壓不變,則更新儲存結構中儲存的連接狀態為已拔出狀態。A mobile phone USB port detection system running on a chip of a mobile phone, the voltage of the USB port of the mobile phone being the same as the voltage of the charging port, the chip comprising a storage structure for storing the connection between the mobile phone and the terminal device The system includes: a receiving module, configured to receive a signal transmitted by a data line of the USB port; and a voltage measuring module configured to measure the charging after the receiving module receives the signal transmitted by the data line a voltage of the ;; a recording module, configured to update the connection state stored in the storage structure to an inserted state if the measured voltage of the charging strobe rises; the voltage measuring module is further used for every time t Measuring a voltage of the charging port; determining a module for determining whether the voltage of the charging port is decreased; and the recording module is further configured to: if the voltage of the charging port does not decrease, and the constant time T′ does not change, And updating the connection state stored in the storage structure to the inserted state; and the recording module is further configured to: if the voltage of the charging port decreases, update the connection state stored in the storage structure to In the state, if the voltage drop after charging port of a certain time T 'the constant voltage, the updated connection state stored in the storage structure is unplugged state. 如申請專利範圍第1項所述之手機USB埠偵測系統,所述t為4.615ms,T’為3s。For example, in the mobile phone USB port detection system described in claim 1, the t is 4.615 ms and the T' is 3 s. 一種手機USB埠偵測方法,該方法包括如下步驟:(a)接收USB埠的資料線傳輸的訊號;(b)當接收到所述資料線傳輸的訊號後,測量充電埠的電壓,該充電埠的電壓與該手機USB埠的電壓相同;(c)若所測量的充電埠的電壓上升,則更新儲存結構中所儲存的連接狀態為插入中狀態;(d)每隔時間t測量一次充電埠的電壓,判斷在時間t所測得的充電埠的電壓是否下降,若該充電埠電壓沒有下降,進入步驟(e),若該充電埠電壓下降,則進入步驟(f);(e)當在一定時間T’內該電壓不變時,更新儲存結構中所儲存的連接狀態為已插入狀態,並轉至步驟(d);(f)更新儲存結構中儲存的連接狀態為拔出中狀態;(g)每隔時間t測量一次充電埠的電壓;及(h)若該充電埠的電壓下降後一定時間T’內電壓不變,則更新儲存結構中儲存的連接狀態為已拔出狀態。A method for detecting a USB port of a mobile phone, the method comprising the steps of: (a) receiving a signal transmitted by a data line of a USB port; (b) measuring a voltage of the charging port after receiving the signal transmitted by the data line, the charging The voltage of 埠 is the same as the voltage of the USB port of the mobile phone; (c) if the measured voltage of the charging port rises, the connection state stored in the storage structure is updated to the state of insertion; (d) the charging is measured every time t The voltage of 埠 determines whether the voltage of the charging 测 measured at time t decreases, and if the charging 埠 voltage does not decrease, proceeds to step (e), and if the charging 埠 voltage drops, proceeds to step (f); (e) When the voltage does not change within a certain time T', the connection state stored in the update storage structure is the inserted state, and the process proceeds to step (d); (f) the connection state stored in the storage structure is updated to be extracted. State; (g) measuring the voltage of the charging port every time t; and (h) if the voltage within the constant time T' does not change after the voltage of the charging port drops, updating the connection state stored in the storage structure to be pulled out status. 如申請專利範圍第3項所述之手機USB埠偵測方法,所述t為4.615ms,T’為3s。The method for detecting a mobile phone USB port as described in claim 3, wherein the t is 4.615 ms and the T' is 3 s. 如申請專利範圍第3項所述之手機USB埠偵測方法,所述步驟(e)還包括:當在一定時間T’內該充電埠電壓改變時,則轉至步驟(d)。The method for detecting a mobile phone USB port according to claim 3, wherein the step (e) further comprises: when the charging voltage changes within a certain time T', then the process proceeds to the step (d). 如申請專利範圍第3項所述之手機USB埠偵測方法,所述步驟(h)還包括:當該充電埠的電壓下降後一定時間T’內電壓改變時,判斷該充電埠的電壓是否上升;若該充電埠的電壓上升,轉至步驟(c);及若該充電埠的電壓下降,則轉至步驟(g)。The method for detecting a mobile phone USB port according to claim 3, wherein the step (h) further comprises: determining whether the voltage of the charging device is changed when the voltage changes within a certain time T′ after the voltage of the charging device drops If the voltage of the charging port rises, go to step (c); and if the voltage of the charging port drops, go to step (g).
TW98111244A 2009-04-03 2009-04-03 System and method for detecting usb port of a mobile phone TWI420888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98111244A TWI420888B (en) 2009-04-03 2009-04-03 System and method for detecting usb port of a mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98111244A TWI420888B (en) 2009-04-03 2009-04-03 System and method for detecting usb port of a mobile phone

Publications (2)

Publication Number Publication Date
TW201038047A TW201038047A (en) 2010-10-16
TWI420888B true TWI420888B (en) 2013-12-21

Family

ID=44856903

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98111244A TWI420888B (en) 2009-04-03 2009-04-03 System and method for detecting usb port of a mobile phone

Country Status (1)

Country Link
TW (1) TWI420888B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW595239B (en) * 2003-01-28 2004-06-21 Htc Corp Detection circuit to detect the earphone type plugged into the insertion hole
CN2711938Y (en) * 2004-05-14 2005-07-20 万国电脑股份有限公司 USB connector having signal detector and application system thereof
US20070276971A1 (en) * 2001-04-06 2007-11-29 Nokia Corporation Universal serial bus circuit which detects connection status to a usb host
TW200825699A (en) * 2006-08-17 2008-06-16 Standard Microsyst Smc System and method for enumerating a USB device using low power
US20080228969A1 (en) * 2004-08-27 2008-09-18 Sin Hui Cheah Apparatus and Method for Enabling Digital and Analog Data Communication Over a Data Bus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276971A1 (en) * 2001-04-06 2007-11-29 Nokia Corporation Universal serial bus circuit which detects connection status to a usb host
TW595239B (en) * 2003-01-28 2004-06-21 Htc Corp Detection circuit to detect the earphone type plugged into the insertion hole
CN2711938Y (en) * 2004-05-14 2005-07-20 万国电脑股份有限公司 USB connector having signal detector and application system thereof
US20080228969A1 (en) * 2004-08-27 2008-09-18 Sin Hui Cheah Apparatus and Method for Enabling Digital and Analog Data Communication Over a Data Bus
TW200825699A (en) * 2006-08-17 2008-06-16 Standard Microsyst Smc System and method for enumerating a USB device using low power

Also Published As

Publication number Publication date
TW201038047A (en) 2010-10-16

Similar Documents

Publication Publication Date Title
US7987298B2 (en) System and method for detecting the status of a universal serial bus port of a mobile phone
CN102446146B (en) Server and method for avoiding bus collision
US20140244203A1 (en) Testing system and method of inter-integrated circuit bus
US9373375B2 (en) Non-volatile memory validity
US11513933B2 (en) Apparatus with temperature mitigation mechanism and methods for operating the same
US8526259B2 (en) Disk drive with state-information data buffer
CN104572382A (en) I2C (inter-integrated circuit) bus test jig
TWI426513B (en) Information processing system
TW201439751A (en) Graphic card inspection system and method thereof
TW201533578A (en) Computer system and USB device detecting method thereof
CN106775847B (en) Board card software version updating method and device
US9158646B2 (en) Abnormal information output system for a computer system
TWI420888B (en) System and method for detecting usb port of a mobile phone
US8598900B2 (en) System and method for testing electronic device
CN116185777A (en) Method, device and system for monitoring power consumption of server and server
US20110130989A1 (en) System and method for identifying a peripheral component interconnect express signal
CN116701267A (en) Performance test method and interface conversion device of PCIE interface of main board
JP7004911B2 (en) Information processing equipment, processor, and optical fiber inspection method
US8060332B2 (en) Method for testing sensor function and computer program product thereof
CN116521480A (en) Power consumption reading precision test system, method, device, equipment and storage medium
KR100751108B1 (en) Method and apparatus of distinguish input signal for display
CN111028881B (en) Open Block testing device, method and system
EP3480608B1 (en) Method and system for measuring power-on reset time
US20230418710A1 (en) Information processing apparatus, and control method
US20190005810A1 (en) Information setting device and electronic appliance

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees