로그인회원등록 내글장바구니주문조회현재접속자
 상품 검색








 게시판 검색





 
 
회원등록 비번분실


온라인 입금계좌
ㆍ기업은행
ㆍ219-043192-01-028
ㆍ이건영

      거래은행 바로가기
 
 SX, MPU Applications
SX, MPU 자료실
작성자 leeky        
작성일 2006/03/16
첨부#1 sxusb_anal.asm.zip (0KB) (Down:23)
첨부#2 sxusb_anal_shot.jpg (0KB) (Down:10)
Link#1 index.html (Down:53)
ㆍ추천: 5  ㆍ조회: 2798   
  SX28 USB 분석장치 (SX-Atpapch)

World’s Smallest Low-speed USB Analyzer ( Atapchi )

[Any] idea is dead without a good application for it.
So “California Dreamin’” USB virtual peripheral could be
a very nice sample of academic research,
but hardly anybody is going to build a keyboard or mouse using it.
I have been thinking for a while what to do with it as well.

First project that came to my mind was building a hardware key logger
for USB keyboards, something like http://www.keyghost.com/, built
for PS2 protocol using PIC16F877.
It was quite simple to implement USB part using SX,
serial EEPROM and a few switching IC’s.

Furthermore I found out that built-in features of SX MCU would help
to create a device able to work not only with pure low-speed USB keyboards,
but also composite, built-in-hub, things, hence covering all existing systems
(SUN, Mac, PC).

Recording keystrokes is fun, but if we can do that,
why not go further and try to record all low-speed USB traffic.
No problem for SX again, problem for the memory.
Serial EEPROM is just to slow to handle it.
Solution was http://www.ramtron.com/ FRAM with 1MHz two-wire interface
(let me pay credit here to http://www.svtehs.com/, who happens to advertise it).

Finally “California Dreamin’” found a real life application
in the world’s smallest low-speed USB analyzer “Atapchi”
(stands for a small fruit in Singapore, tastes like apricot).
I hope you find this project interesting
(mail your questions to chinook at pacific.net.sg)
mailto: cShPiAnMook@SpPaAcMific.net.sg

-Ataphchi 특징
저속 USB의 특성을 완전히 지원
불휘발성 메모리에 500 transactions을 저장
신호 품질 점검
CRC 일치 점검
Bit 추가(stuffing) 점검
데이터 넘침(overflow) 점검
단일부품으로 포착기능(capturing)지원
외부 격발(triggering)
USB 버스의 전원을 사용

-Atapchi 응용
HID 클래스 저속(V1.1) USB 주변장치의 개발
소규모 USB 기반 네트웍 장치의 개발

-Atapchi를 사용할 수 있는 MCU 목록 (전부가 아님-이 외에도 많다)
사이프레스 : CY7C630/1XX, CY7C3X/5XX, CY7C636XX, CY7C632XXA, CY7C637XX
마이크로칩 : PIC16C745, PIC16C765, PIC16F747, PIC16F767, PIC16F745, PIC16F765
모톨롤라 : MC68HC908BD48, MC68HC08JB1, MC68HC908JB8, MC68HC05JB3, MC68HC05JB4
시그네틱스: ST7261X, ST7262X, ST7263

-Atapchi 구조
Ubicom SX48BD MCU의 완전한 100% USB 소프트웨어 (California Dreamin의 향상된 버전)
http://www.sxlist.com/techref/scenix/lib/io/dev/keys/usbdemo-mh.htm

2선식 1MHz의 Ramtron FM24C64-S 64Kb 플래시 램 직렬 메모리
무라타사의 50 MHz 소령 세라믹 공진기(resonator)
스위칭 회로 (다른 제조사) -USB 전용 인터페이스 불필요 (Atapchi는 USB 중계기로 사용된다)

-Atapchi 작동모드
Input, recording low-speed USB traffic.
Atapchi is plugged into a USB self-powered hub,
a USB repeater is plugged into Atapchi,
device under development is plugged into the repeater.
All traffic from/to the device is recorded.

-입력
recording low-speed USB traffic.
Atapchi is plugged into a USB self-powered hub,
a USB repeater is plugged into Atapchi,
device under development is plugged into the repeater.
All traffic from/to the device is recorded.
 

-출력
downloading the data. Atapchi is plugged into a USB repeater,
the repeater is plugged into a self-powered hub.
Atapchi enumerates as a generic USB keyboard
and types memory content into any text editor.



-Device is the mouse you see on the picture above (Justy UMN-05 SG).
MCU used is omnipresent Cypress CY7C63001A. Total listing length is 1083 lines.

reset
eop 060
0001 00 0 setup
0002 data0 [ bb 29 ] 80 06 00 01 00 00 40 00
0003 ack

eop 001
0004 00 0 in
0005 data1 [ c8 e7 ] 12 01 00 01 00 00 00 08
0006 ack

eop 002
0007 00 0 out
0008 data1 [ 00 00 ] zero-length
0009 ack reset

eop 043
0010 00 0 setup
0011 data0 [ 57 85 ] 00 05 05 00 00 00 00 00
0012 ack

eop 001
0013 00 0 in
0014 data1 [ 00 00 ] zero-length
0015 ack

eop 014
0016 05 0 setup
0017 data0 [ 07 2f ] 80 06 00 01 00 00 12 00
0018 ack

eop 001
0019 05 0 in
0020 data1 [ c8 e7 ] 12 01 00 01 00 00 00 08
0021 ack

eop 001
0022 05 0 in
0023 data0 [ 7e 33 ] 58 04 03 00 00 00 01 02
0024 ack

-California Dreamin SX USB Keyboard Demo
by Michael Hetherington
Used in the EXCELLENT Atapchi: World's Smallest Low-speed USB Analyzer
 

;California dreamin' (aka SX USB Virtual Peripheral) Version 1.00
;Copyright (C) 2001 Michael Hetherington
;chinook@pacific.net.sg
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation.
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;SX28AC enumerates as generic USB keyboard and types the lyrics of "California dreamin'"
;on every press of led toggling key (Caps Lock, Scroll Lock and Num Lock).
;Works perfectly with Windows 2000 PC and any text editor.
;It has not been tested on Macs or Unix platform yet.
;Power can be driven from USB port, however independent 5V source is recommended.
;The following design does not meet all USB requirements
;and provides just an example of simple interface to USB using Scenix MCU and widely
;available components:
;bus driver 74LCX125
;Resonator - 50 MHz (Murata)
;Environment - SX Key

-Download file for SXusb-keydemo.asm with SXusb-keydemo-sch.gif

-SX-usb-Atpapch.asm의 설명
;California dreamin' (aka SX USB Virtual Peripheral) Version 1.00
;Copyright (C) 2001 Michael Hetherington
;chinook@pacific.net.sg
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation.
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.


;SX28AC enumerates as generic USB keyboard and types the lyrics of "California dreamin'"
;on every press of led toggling key (Caps Lock, Scroll Lock and Num Lock).
;Works perfectly with Windows 2000 PC and any text editor.
;It has not been tested on Macs or Unix platform yet.
;Power can be driven from USB port, however independent 5V source is recommended.
;The following design does not meet all USB requirements
;and provides just an example of simple interface to USB using Scenix MCU and widely
;available components:
;bus driver 74LCX125
;Resonator - 50 MHz (Murata)
;Environment - SX Key

DEVICE SX28L,oscxtmax,turbo,stackx_optionx
RESET Start


rx_lo equ 1 ; D+ USB line
rx_hi equ 2 ; D- USB line pulled by 1.5K to 3.3V
comp equ 3 ; comparator output
tx_lo equ 4 ; drive D+
tx_hi equ 5 ; drive D-
oe equ 6 ; line driver output enable (inverted)



usb_port equ rb
usb_port_tris equ %10001110

rx_lo_pin equ rb.1 ; respective IC pins
rx_hi_pin equ rb.2
comp_pin equ rb.3
tx_lo_pin equ rb.4
tx_hi_pin equ rb.5
oe_pin equ rb.6

;**********************************************************************************
; Buffer break-down
; Starting address $03
; We have 8 buffers to store data
;**********************************************************************************

address_lo equ $30

sync_bit equ 7 ; to keep synchronized (10001000100....)
ep1_in equ 6 ; to keep respective token packets
ep0_in equ 5 ; to give ACK, NACK or STALL
ep0_out equ 4
setup equ 3
all_data equ 2 ; all incoming data
ep1_data equ 1 ; buffer of 14 bytes to keep IN data
ep0_data equ 0 ; buffer of 14 bytes to keep IN data and OUT data

;**********************************************************************************
; Token packets buffers are underutilised
; Use upper address for handshake packets
; Starting address $09
;**********************************************************************************

address_hi equ $90

ack equ 6
nack equ 5
stall equ 4

;**********************************************************************************
; For USB interface execution of interrupt will be done
; every 20-25 cycles to catch the start of a packet.
; Once the packet arrived 1,5 MHz acquisition rate should be maintained.
; With 50MHz resonator it means interrupt executes every 33 cycles 3 times and
; every 34 cycles 1 time, this cycle will be called leap cycle (after leap year)
;**********************************************************************************

int_idle equ 25
int_active equ 33
int_leap equ 34


usb_states equ $08 ;main body state machine
int_states equ $09 ;interrupt state machine

buffer_count equ $0A ;bit transmit/receive counter in buffers
temp equ $0B ;register to hold function specific values
;holds current value of rb

usb_mask equ $0C ;masking different buffers on reset and address
;change

packet_rx equ $0D ;packet mask while Rx
packet_tx equ $0D ;packet mask while Tx
reset_timer equ $0D ;monitor the time out for the bus
;to detect reset conditions for Rx

tx_timer equ $0E ;the number of bits to send
;it is loaded with the value of
;usb_ep0_counter or usb_ep1_counter

usb_flags equ $0F ;general flags

flg_setup equ usb_flags.0 ;setup packet was received
flg_out equ usb_flags.1 ;out packet was received
flg_ep0_send equ usb_flags.2 ;data is ready for transmission from ep0
flg_ep0_in equ usb_flags.3 ;in packet for ep0 is received
flg_ep1_send equ usb_flags.4 ;data is ready for transmission from ep1
flg_ep1_in equ usb_flags.5 ;in packet for ep1 is received
flg_ep0_data equ usb_flags.6 ;data 0/1 toggle for ep0
flg_ep1_data equ usb_flags.7 ;data 0/1 toggle for ep1


org $10
USB_BANK = $

usb_hold equ $10 ;the same memory cell
usb_ep0_byte equ $11 ;keeps temporary variables
usb_sub_states equ $12 ;substates of main state machine
usb_ep0_table_s equ $13 ;ep0 tx table start
usb_ep0_table_e equ $14 ;ep0 tx table end
usb_ep1_table_s equ $15 ;ep1 tx table start
usb_ep1_table_e equ $16 ;ep1 tx table end

usb_buffer equ $17
usb_address equ $18
usb_temp equ $19
usb_bit_stuff equ $1A
usb_bit_count equ $1B

usb_ep0_counter equ $1C ;the number of bits to send on EP0 IN packet
usb_ep1_counter equ $1D ;the number of bits to send on EP1 IN packet

usb_crc5 equ $1F
usb_crc16_hi equ $1F
usb_crc16_lo equ $1E

org 0
Interrupt
mov temp,rb
mov w,int_states
add PC,w

IDLE_loc = $
;***********************************************************************************
; IDLE STATE
; D- stays high
; D+ stays low
;***********************************************************************************
,,, 이하 생략, 첨부된 소스를 참조 하세요.

원저자 : http://sxlist.com/techref/io/serial/usb/atapchi/index.html
 
AVRTOOLS™

   
윗글 SX52 MMC(메모리카드) WAV화일 녹음과 재생
아래글 SX color TV 게임기
    N         제목    글쓴이 작성일 조회 추천
48 SXB 무료 Basic 컴파일러 SX18/20/28 avrtools™ 2008/12/03 (수) 1630 0
47 SX28 IR-Remote Signal Analyzer avrtools™ 2016/01/22 (금) 548 0
46 삼성 안드로이드폰 GT-i5700 무선 오실로스코프 avrtools™ 2011/09/10 (토) 2955 10
45 SX28 Clock Timer 소스 avrtools™ 2008/12/03 (수) 1912 0
44 SX28 Scanning a 4x4 Keypad 소스 avrtools™ 2008/12/03 (수) 2031 0
43 SX28 Thermometer 소스 avrtools™ 2008/12/03 (수) 1725 0
42 SX28 Serial LCD 소스 avrtools™ 2008/12/03 (수) 1693 0
41 SX28 Digital Dice 소스 avrtools™ 2008/12/03 (수) 1563 0
40 IDE51-C 8051 C컴파일러 (사용제한 없음) avrtools™ 2008/12/03 (수) 2461 0
39 uc51 검파일러 8K 무료버전 avrtools™ 2008/12/03 (수) 1754 0
38 SXC Demo avrtools™ 2008/12/02 (화) 1450 0
37 SxSim (UBICOM의 SASM 어셈블러를 지원) avrtools™ 2008/12/02 (화) 1689 0
36 SXkey52.exe SX48, SX52 전용 소프트 avrtools™ 2008/12/02 (화) 1507 0
35 SX 칩 프로그래머/인서킷 에뮬레이터 SXKey v3.0 avrtools™ 2008/12/02 (화) 1472 0
34 Serial port keyboard stuffer avrtools™ 2008/11/09 (일) 2246 0
33 IBM AT Keyboard의 Hexa 값 leeky 2007/11/12 (월) 2205 0
32 PC 소프트웨어 오실로스코프 avrtools™ 2008/10/07 (화) 2588 0
31 저항 읽는 방법과 저항 소프트웨어 avrtools™ 2008/09/26 (금) 2450 0
30 BMP to LCD avrtools™ 2008/09/22 (월) 2205 0
29 SX18/20/28용 무료 베이직 SXB V3.1 leeky 2006/03/03 (금) 3533 22
28 절연 RS232C 회로 avrtools™ 2008/08/29 (금) 2715 0
27 문자표시 LCD 모듈의 사용방법 leeky 2006/04/06 (목) 4892 0
26 Bin2Hex.exe leeky 2007/11/12 (월) 2678 0
25 LPT Port Tester leeky 2007/11/12 (월) 2612 0
24 PC 프린터 포트의 사용법 leeky 2007/11/12 (월) 2886 0
23 병렬포트(LPT1) 시험 소프트웨어 leeky 2007/11/12 (월) 2509 0
22 SX 칩 4비트 LCD 소스 leeky 2006/02/20 (월) 2903 30
21 SxSim (UBICOM의 SASM 어셈블러를 지원) leeky 2006/02/13 (월) 2329 27
20 SXkey52.exe leeky 2006/02/13 (월) 2111 28
19 SX 프로그래머/에뮬레이터 SXKey v3.0 leeky 2006/02/13 (월) 2304 24
18 SXC Demo Version leeky 2006/03/16 (목) 2190 27
17 SX52 웹서버 + 겜보이 카메라 leeky 2006/03/16 (목) 2414 5
16 CMUcam2 (Cam + 5 Servo) leeky 2006/03/16 (목) 2888 3
15 CMUcam Vision Sensor KIT with SX28 leeky 2006/03/16 (목) 3187 4
14 SX52 이더넷 평가기판의 소스 (iSX 소프트) leeky 2006/03/16 (목) 3085 1
13 SX52-이더넷 평가기판 (하드웨어) leeky 2006/03/16 (목) 2474 1
12 SX52 MMC(메모리카드) WAV화일 녹음과 재생 leeky 2006/03/16 (목) 3064 5
11 SX28 USB 분석장치 (SX-Atpapch) leeky 2006/03/16 (목) 2798 5
10 SX color TV 게임기 leeky 2006/03/16 (목) 3016 4
9 SX28 Serial to TV leeky 2006/03/16 (목) 2646 3
8 SX18 영상(NTSC) 동기검출 leeky 2006/03/16 (목) 2255 2
7 SX28 디지털 스코프 leeky 2006/03/16 (목) 2619 3
6 SX28 500KHz DDS 신호발생기 leeky 2006/03/16 (목) 2752 0
5 SX Morse Code Keyer avrtools 2006/03/16 (목) 1986 2
4 SX28 Video OSD Module leeky 2006/03/16 (목) 2943 0
3 1.2MHz/2.4GHz Exciter leeky 2006/02/25 (토) 2333 0
2 16F84 G3RUH 9600BPS Modem leeky 2006/02/25 (토) 2416 2
1 16F84 Morse Decoder leeky 2006/02/25 (토) 3280 1
1

바구니 : 0
 보관함 : 0
오늘뷰 : 0
HOME   |   회사소개   |   제휴안내   |   회사위치   |   서비스이용 약관   |   개인정보 보호정책   |   사이트맵
17015 경기도 용인시 기흥구 동백중앙로16번길 16-25, 508호. 전화 : 031-282-3310
사업자 등록번호 : 697-47-00075 / 대표 : 이건영 / 업태 : 제조업 / 종목 : LED조명, LED전원, 제어장치.
개인정보 관리책임자 : 홈페이지 관리자 . Copyright ⓒ2016 아크레즈 (ACLEDS INC.)
HOME TOP PREVNEXT 0 0 0