Maxim Integrated DS8007 Скачать руководство пользователя страница 4

JU13

Installed: Connect pins 2
and 3

DS8007's INTAUX pin connected to GND (through 10K)

Creating and Loading an Executable File

The next step is to create a .HEX file that can be downloaded into the board's memory and can then be
executed by the DS5002FP. Creating this file involves configuring the Keil µVision® project file to create
the proper loadable file, and then downloading it to the board's nonvolatile memory.

Creating the µVision Project

After the Keil C51 Development Tools are installed on the PC, start the µVision program by clicking on
the icon created. We will now create a project and C source files for the demonstration program by
following these steps:

1.  Under the Project heading, select "New Project," and type DS8007-1 for the project name.
2.  When the "Select Device for Target" appears, select the Dallas Semiconductor group and the

DS5002FP from the device selection list.

3.  Click the "Yes" button when the "Copy Standard 8051 Startup Code to Project Folder and Add File

to Project" message appears.

4.  Create the source file by clicking "File" then "New," and typing the following information. If you

prefer downloading this file, it is available for 

download

 (ZIP, 11kB).

// File DS8007-1.C 

#include <REG5000.H>                    // special function register 
declarations 
//                                      // for the DS5000/5002                    
#include <stdio.h>                      // prototype declarations for I/O 
functions 

// Main C function.  Program execution starts here.
void main (void) {

// Set up the serial port for 38400 baud at 14.7MHz.
        TMOD=0x21;                      // Timer 1: 8-bit auto-reload 
from TH1, Timer 0: 16-bit
        TH1 = 0xFE;                     // Set timer reload value for 
38,400 baud
        PCON|=0x80;                     // Turn on baud rate doubler 
SMOD_0
        TCON=0x50;                      // Enable timers 0 and 1
        SCON=0x50;                      // 10-bit async, enabled
        TI=1;                           // Set TI to send first character
        TR1 = 1;                        // Start timer 1

// Start main program
        printf ("\nHello DS8007 World!\n\n");   // Output message
        while (1) ;                     // End program by looping here.
}

5.  After this text has been entered, save the file by clicking "File" then "Save As" and typing in

"DS8007-1.c" as the file name.

6.  Add this file to the project list by right-clicking on Target 1 in the Project Workspace window, and

then click the "Manage Components" option. Under the Project Components tab, click the "Add
Files" button, and then enter the file name (DS8007-1.c) in the file name area. Click the "Add"
button and then click the "Close" button. Click the "OK" button to close the Components window.

Page 4 of 11

Содержание DS8007

Страница 1: ...executed by the on board DS5002FP microcontroller A simple Hello World example is provided as well as a number of functions in C source code that will demonstrate use of the on board LCD module Overv...

Страница 2: ...s not autoboot browse the CD root folder and double click on the index html file 2 Click the Install MTK button and click the Run button to begin installation 3 During the MTK installation select the...

Страница 3: ...ard s AVDD connected to smart card socket 1 pin S2 JU5 Installed Connect pins 2 and 3 Board s AVDD connected to smart card socket 1 pin S1 through 10K JU6 Not Installed JU7 Not Installed JU8 Installed...

Страница 4: ...New and typing the following information If you prefer downloading this file it is available for download ZIP 11kB File DS8007 1 C include REG5000 H special function register declarations for the DS50...

Страница 5: ...te Executable if it is not already and be sure that the Create HEX File box is checked Select the HEX Format of HEX 80 from the dropdown selector box as shown in Figure 4 All other selections in this...

Страница 6: ...lect Device window Figure 5 and click OK 3 Click Options and then click Configure Serial Port Select the Port e g COM1 of the PC to which the DS8007 board is connected Then select the Speed 38400 from...

Страница 7: ...r User s Guide for details which in this case is 01 The DS8007 board is now ready to load the program file created with the Keil development tools 1 Click File and then select Load SRAM Select the fil...

Страница 8: ...y adjust R7 until the blocks just disappear This sets the contrast of the LCD so that the characters will be visible but spaces will not Follow steps 1 through 10 above Create the Vision Project to cr...

Страница 9: ...ar 5 if tmp 0 LCD_WRStr LCD_Str Write string to LCD strcpy LCD_Str Smart Card Interface Create 2nd line of LCD text tmp LCD_Curpos 2 1 Position cursor on line 2 char 1 if tmp 0 LCD_WRStr LCD_Str Write...

Страница 10: ...0 LCD module void LCD_WRCmd uint8_t LCD_Cmd LCD_EN 0 Make sure that the LCD enable is low LCD_RS 0 Set LCD register select and R W lines LCD_RW 0 LCD_Busy Make sure that the display is not busy LCD_Da...

Страница 11: ...osoft Corporation Related Parts DS5002FP Secure Microprocessor Chip Free Samples DS5250 High Speed Secure Microcontroller DS8007 Multiprotocol Dual Smart Card Interface Free Samples DS8007 KIT DS8007...

Отзывы: