Oki JOB60851 Скачать руководство пользователя страница 21

Chapter 2  Putting Board through its Paces

page 2-8

Speed

38,400 b/s

Word size

8 bits

Parity check

None

Stop bits

2

Flow control

None

(3) Activating JOB60851 board

Once the terminal emulator is configured, turn on the power (#2 in Figure 2.1.1).

2-3-3.

Synchronizing Link

Before communicating with the JOB60851 board, check that it and the development host are using
the same data transfer speed by downloading the file !zero.dat in the work directory--c:\test in our
example.

(1) Using HyperTerminal

1. Choose the Transfer menu's Send text file command.

2. In the dialog box that appears, double-click the file !zero.dat.

3. Wait for the response OK indicating synchronization.

(2) Using Tera Term Pro

1. Choose the File menu's Send file command.

2. In the dialog box that appears, make sure that the Binary option in the lower left corner is

selected and double-click the file !zero.dat.

3.  Wait for the response OK indicating synchronization.

2-3-4.

Downloading and Executing

Next repeat the above procedure with the precompiled "Hello world!" program (main.hex) in the
work directory--c:\test in our example.

(1) Using HyperTerminal

1. Choose the Transfer menu's Send text file command.

2. In the dialog box that appears, double-click the file main.hex.

3. Wait for the response "Hello World" indicating successful downloading and execution.

4. To terminate communications, close the window and answer "Yes" to the query asking

permission to break the link.

5. Answering "Yes" to the query asking whether to save the session saves the current settings

under the name first entered or selected above in Section 2.3.2 for reuse next time.

(2) Using Tera Term Pro

1. Choose the File menu's Send file command.

2. In the dialog box that appears, make sure that the Binary option in the lower left corner is

selected and double-click the file main.hex.

3. Wait for the response "Hello World" indicating successful downloading and execution.

(3) Compiling, downloading, and executing a program

The above procedures simply download a precompiled program that was ready to run. Now it is
time to compile an actual user program. By way of illustration, the following simply modifies

Содержание JOB60851

Страница 1: ...OKI JOB60851 Starter Kit User s Manual Version 1 07 July 27 2000 Oki Electric Industry Co Ltd Technocollage Inc...

Страница 2: ......

Страница 3: ...l and intellectual property right etc is granted by us in connection with the use of the product and or the information and drawings contained herein No responsibility is assumed by us for any infring...

Страница 4: ...necting Board 2 4 2 2 Running Default Program 2 4 2 2 1 Installing USB Driver 2 4 2 2 2 Running Flash Memory Program 2 4 2 3 Running User Programs 2 6 2 3 1 Connecting Serial Cable 2 7 2 3 2 Loading T...

Страница 5: ...Types 4 4 4 1 5 Bus Transactions 4 4 4 1 6 Packets 4 5 4 1 7 Endpoints 4 5 4 1 8 Data Rates 4 6 4 1 9 Device Class Specifications 4 6 4 1 10 Device Requests 4 7 4 1 11 Standard Device Requests 4 7 4...

Страница 6: ...siderations 4 19 4 3 5 Building a Product 4 20 4 3 6 Vendor and Product IDs 4 20 4 3 7 Other Tools Necessary 4 20 4 3 8 Note on Porting 4 21 4 3 9 Limitations 4 22 4 4 Port 7 LED2 Control 4 22 4 4 1 P...

Страница 7: ...1 Introduction...

Страница 8: ...nnectors 2 Introduction this page 1 The CD ROM contains the following directories and files Document Documentation CC665S C compiler User s Manual etc JOB60851 JOB60851 Starter Kit User s Guide etc M6...

Страница 9: ...g development environment Microsoft Windows 98 USB interface fully compatible with Microsoft Windows 98 USB driver Terminal emulation software The compiler package will also run under Microsoft Window...

Страница 10: ...on This label indicates precautions that if ignored or otherwise not completely followed could lead to personal injury or property damage Icons A triangular icon draws your attention to the presence o...

Страница 11: ...nnect all external power cords Continued use risks fire and electrical shock Do not use the product in an environment exposing it to moisture or high humidity Such exposure risks fire and electrical s...

Страница 12: ...tures outside the specified range direct sunlight or excessive dust Such factors risk fire and breakdown Use only the cables and other accessories provided Using non compatible parts risks fire and br...

Страница 13: ...section of the manual n Application Example n An application example indicates an example related to the current topic note note is a reference to a numbered note that provides supplementary informat...

Страница 14: ...2 Putting Board through Its Paces...

Страница 15: ...e 2 1 1 are all in their factory default positions B Figure 2 1 1 JOB60851 Board Top View 1 AC adapter jack 6 Serial RS 232C connector 2 Power switch 7 Clock selection jumper 3 Flash writer connector...

Страница 16: ...xplorer set to display file extensions 2 Create a work directory c test for example 3 Using a text editor create the following batch file in the work directory c665 bat for example Modify the c 665s p...

Страница 17: ...ion for testing bulk data flow 1 Create a directory for the host software c usb for example 2 Copy the contents of the CD ROM directory package host to that directory Rwbulk exe Bulkusb sys Bulkusb in...

Страница 18: ...e input pipe fo fn where fn is a filename for the output pipe vl n where n is verbose level 0 2 5 default 2 c n where n is number of iterations default 1 0 is infinity The options and the meanings are...

Страница 19: ...r if both operations are successful Device Opened successfully pipe00 W tot 1024 17 04 16 req 1024 1024 written pipe01 R tot 1024 17 04 16 req 1024 1024 read 5 Try multiple transfers C USB rwbulk exe...

Страница 20: ...able to the JOB60851 board Speed 38 400 b s Word size 8 bits Parity check None Stop bits 2 Flow control None 1 Loading and configuring HyperTerminal 1 Load HyperTerminal by double clicking the Hypertr...

Страница 21: ...repeat the above procedure with the precompiled Hello world program main hex in the work directory c test in our example 1 Using HyperTerminal 1 Choose the Transfer menu s Send text file command 2 In...

Страница 22: ...r 5 Double click the 665s pif icon and enter the following command line to compile the new version into test hex an executable for downloading to the JOB60851 board n Note n Case counts for command li...

Страница 23: ...3 System Specifications...

Страница 24: ...d s primary objective is lowering the threshold for developing new USB devices 3 1 2 System Components The JOB60851 board has the components shown in Figure 3 1 1 JOB60851 Figure 3 1 1 System Block Di...

Страница 25: ...Output 10 V DC 850 mA n Note n Use only the AC adapter included with the product 2 Power switch Pressing this switch alternately turns the power to the board on and off If the indicator fails to ligh...

Страница 26: ...jumper This jumper offers a choice of two onboard MSM66Q573 microcontroller system clock frequencies 16 A and 24 B MHz 8 9 Power supply jumpers These jumpers offer a choice of two power supplies USB...

Страница 27: ...Chapter 3 System Specifications page 3 5 3 2 2 Circuit Diagram Figure 3 2 2 Circuit Diagram 1 2...

Страница 28: ...em Specifications page 3 6 Figure 3 2 3 Circuit Diagram 2 2 n Note n An electronic version of this circuit diagram is available in the CD ROM directory document job60851 as the MS Power Point document...

Страница 29: ...00mA 22 1 DB1 DIODE 200v 1A Bridge Type 23 2 FB1 FB2 FB Ferrite Bead Inductor 24 1 L1 2 2uH 2 2uH Inductor 25 1 IC1 M66Q573 Micro Controller 26 1 IC2 HM628128AL 128K x 8b SRAM 27 1 IC3 M27C256H 32K x...

Страница 30: ...k from the development host to program RAM Figure 3 2 4 Memory Map for Download Mode 1 0000 h 0 0200 h 0 1200 h 0 0000 h SFR XSFR Int _RAM 0 8000 h 0 3000 h 0 2000 h Ext _SRAM A or B ML60851A 1 0200 h...

Страница 31: ...Flash Execution Mode 1 0000h 0 0200h 0 1200h 0 0000h SFR XSFR Int _RAM 0 8000h 0 3000h 0 2000h Ext _SRAM A or B ML60851A 1 0200h 1 1200h 1 8000h 1 3000h 1 2000h 1 FFFFh Data Memory 0 0000h ProgramMem...

Страница 32: ...0 8000 h 0 3000 h 0 2000 h Ext _SRAM C ML60851 1 0200 h 1 1200 h 1 8000 h 1 3000 h 1 2000 h 1 FFFFh Data Memory 0 0000 h Program Memory 0 7FFFh SFR XSFR Int _RAM ML60851 AP Mode 1 memory map Load_Sel...

Страница 33: ...3 2 7 Memory Map for Flash Rewrite Mode 1 0000h 0 0200h 0 1200h 0 0000h SFR XSFR Int _RAM 0 8000h 0 3000h 0 2000h Ext _SRAM C ML60851A 1 0200h 1 1200h 1 8000h 1 3000h 1 2000h 1 FFFFh Data Memory 0 000...

Страница 34: ...12 IC1 2 P10 5 IC5 4 IC1 3 TM5EVT P10 7 R8 R35 IC1 4 RXD1 P8 0 MAX203 20 J13 3 IC1 5 TXD1 P8 1 MAX203 2 J14 3 IC1 6 RXC1 P8 2 IC1 7 TXC1 P8 3 IC1 8 TM4OUT P8 4 IC1 9 PWM2OUT P8 6 IC1 10 PWM3OUT P8 7 I...

Страница 35: ...P4 3 A3 IC2 9 IC3 7 IC4 29 RA2 4 IC1 64 P4 4 A4 IC2 8 IC3 6 IC4 28 RA2 7 IC1 65 P4 5 A5 IC2 7 IC3 5 IC4 27 RA2 3 IC1 66 P4 6 A6 IC2 6 IC3 4 IC4 26 RA2 8 IC1 67 P4 7 A7 IC2 5 IC3 3 IC4 25 J4 2 RA2 2 I...

Страница 36: ...4 Software Development...

Страница 37: ...ler a k a root or Tier 0 hub at the top of a device tree consisting of functions branching off hubs a k a repeaters A tree has up to 127 such devices hubs and functions with addresses 1 to 127 The add...

Страница 38: ...ambiguities in the older version The electrical specifications in Chapter 7 now provide more detail The protocol layer specifications in Chapter 8 add descriptions of STALL operation for the default...

Страница 39: ...ion and pipe control Bulk Transfer of relatively large bursty data volumes with wide dynamic latitude in transmission constraints Interrupt Transfer of small data volumes within time limits based on h...

Страница 40: ...smitter cannot send data Receiver cannot accept data STALL Device Control pipe request not supported Endpoint halted Special PRE Host Preamble enabling downstream bus traffic to low speed devices 4 1...

Страница 41: ...ersal Serial Bus Device Class Specifications complement the core specifications by further standardizing USB devices for major interfaces and specific applications devices using those interfaces Some...

Страница 42: ...set which depends on the request type wLength 2byte Number of bytes transferred during the Data stage A control transfer consists of up to three stages 1 Setup stage The data packet following the SETU...

Страница 43: ...face and thus device characteristics Note that these interfaces are mutually exclusive in that only one can be in use at any given time n Device o Configuration 1 u Interface 1 alternate setting 0 out...

Страница 44: ...r supply attributes Remote wake up support Maximum power consumption when using bus power supply 3 Interface descriptor Total size of this descriptor in bytes Number of interface Number of endpoints u...

Страница 45: ...rocontrollers Err cc665s assembler error output directory Lst cc665s assembler listing file output directory Debug ARM SDT debugging code output directory Release ARM SDT release code output directory...

Страница 46: ...nical queries with regard to this software 4 2 4 Compiling and Executing Sample USB Firmware Compiling the sample USB firmware requires the cc665s compiler installed in Section 2 1 2 Double check the...

Страница 47: ...atically installs the drivers for the JOB60851 board 5 When the USB Compliance Tool dialog box appears click the Full test button at the bottom 6 When the USB Chapter 9 tests dialog box appears click...

Страница 48: ...ory so first clean the HEX and OBJ files from the work directory and then run the make utility n make clean Enter or maker clean Enter nmake Enter or maker Enter Successful compilation produces the fi...

Страница 49: ...ction and initiating data flow usb_init Initialize USB control variables usb_set_callback Specify notification function for bulk transfer compl usb_tx_start Specify transmit data buffer and start usb_...

Страница 50: ...ol vaiables usb_set_callback EP_RX rx_callback Specify receive callback function usb_rx_start buf_rx EP_RX Specify receive data buffer and start while 1 Main loop Transmit Only Skeleton char buf_tx BU...

Страница 51: ...5 Standard I O over Serial Link 4 2 9 Evaluating USB Equipment The USB Implementers Forum has published USB interface compliance guidelines The following URL provides access to guidelines and periphe...

Страница 52: ...y Vcc3 3 0 to3 6V Vcc5 3 0 to 5 5V Interface to 5 volt microcontroller with local power supply Vcc5 Package 44 pin QFP or TQFP 4 3 2 Overview of ML60851C Operation Figure 4 3 1 is a block diagram for...

Страница 53: ...ne ready If the host then sends an ACK completing the transaction the Data transmit transactions send a data packet from the specified endpoint s transmit buffer to the USB bus if there one ready If t...

Страница 54: ...er or intervening hubs For further details refer to the circuit diagram 3 Bus powered operation Moving both the J3 and J15 jumpers from their default 1 2 positions to their 1 3 positions configures th...

Страница 55: ...I functions and callback functions 5 Tuning data flow The flexibility of modification that the sample firmware provides through highly generalized programming sometimes comes at the expense of efficie...

Страница 56: ...ircuit emulator ROM emulator etc for the target microcontroller Look for such tools from the microcontroller vendor and third party sources 4 3 8 Note on Porting JOB60851 programming uses a version of...

Страница 57: ...option makes this the default for all functions without an overt __noacc modifier 6 __noacc This modifier overrides __accpass and the compiler s REG command line option to pass all parameters on the s...

Страница 58: ...ion Control Register P7SF The bits in this register switch between the primary 0 and secondary 1 functions of the corresponding Port 7 pins After a reset this register contains 00H configuring all pin...

Страница 59: ...on the JOB60851 board so be sure to include the corresponding source code file stdrw573 c on the compiler command line CL665S T m66573 H WIN port7exp c stdrw573 c l66ks50s lib Enter This sample progra...

Страница 60: ...Initialize MSM66Q573 and the port P7 0x00 0000_ 000 Clear output data 00B orange P7IO 0xC2 1100_ 010 Configure Port 7 pin 1 for output P7SF 0x03 0000_ 011 Configure Port 7 pins 1 and 0 for secondary f...

Страница 61: ...pings are read and write Because of their tight links with hardware these are known as low level functions as opposed to high level functions without such dependencies Figure 4 5 1 summarizes the data...

Страница 62: ...573 c l66ks50s lib enter 4 5 2 Serial Port Including the source code file stdrw573 c provides the user program with access to this standard I O This Section discusses the MSM66Q573 internal serial por...

Страница 63: ...source code file stdrw573 c uses the following settings Word size 8 bits Stop bits 2 Parity check None Transmit buffer empty interrupt Enabled Transmission end interrupt Enabled b SIO0 Receive Contro...

Страница 64: ...on these two functions refer to the comments in the source code file stdrw573 c This section gives just broad outlines 1 read function Figure 4 5 3 gives a flowchart for function operation Read chara...

Страница 65: ...Figure 4 5 4 gives a flowchart for function operation Read first character from string Character is line feed Character is not line feed Write character to transmit buffer Transmit character in transm...

Страница 66: ...y Reference Sample Program Using Standard Output Read Write sample program 1 Filename rw_smpl1 c Copyright C 1999 TECHNOCOLLAGE Inc All right reserved include stdio h include stdlib h include m66573 h...

Страница 67: ...std_init_573 S0BUF 0x0A Send string to standard output printf_c Please input words n Send string to standard output gets buf Echo input to standard output printf_c Your input words s n buf 4 5 5 Debug...

Отзывы: