FI80 Training Board Technical Overview

Page 1

FI80 Training Board Technical Overview

SPK

GND +V

LDR

G.I/O

The FlamingICE(FI) and FIDE are either registered trademarks or trademarks of AIS Cube in Singapore and/or other countries.


FI80 AUDIO BOARD PINOUT

COMM PORT 2 (VARIABLE BAUD PIN(34) RATE) PIN(33)

G0 G1 G2 G3 C1 C2 C3 C4 N.C N.C

GLCD CONFIG PINS

PORT D Functions: GIO PWM PWM SERVO Pins(17‐24)

24 23 22 21 20 19 18 17 VCC GND

www.aiscube.com

COMM PORT 1 & DOWNLOAD PORT (FIXED BAUD RATE: 115200 kbps)

VIN GND

GIO

16 15 14 13 12 11 10 9 VCC GND

32 31 30 29 28 27 26 25 VCC GND GND VOUTB

SPEAKER OUTPUT

VIN GND

VIN GND

SPK

VIN GND

VIN GND

Note: • • •

8 7 6 5 4 3 2 1 VCC GND

SPI

GIO

VIN GND

DC Input 6V‐12V BAUD Rate for Comm Port 2 may be changed programmatically. MAX wattage for Speaker used: 0.5Watts, 8 ohms.

POWER SUPPLY


FI80AUDIO SCHEMATIC DIAGRAM


GND 5.0v

GND 3.3v CS SCK DIO RESET SDA SCL INT N.C N.C VIN(6V) GND N.C

GND 5.0v 17 18 19 20 21 22 23 24

Temp

VIN GND

FI80 Training Board PINOUT

LDR I/O Pin 13 DS1620 Temperature Sensor PINOUT: Data: Pin 14 Clock: Pin 15 RESET: Pin 16

FI80 Training Board CIRCUIT LAYOUT


GLCD + RTC COMBO EMODULE PINOUT

FRONT

BACK

+

GLCD RTC

RTC GLCD

GLCD + RTC Combo


GETTING STARTED POWERING UP

Temp

www.aiscube.com

VIN GND

Note: •

DC Input 6V‐12V

CONNECTING TO THE PC


LAUNCHING FIDE Upon launching the FIDE (FlamingICE Integrated Development Environment), this dialog should pop up requesting the Comm Number. This comm. Number can be obtained from your Device Manager when you have plugged in you Comm.Key.

You can get the port numbers through: Control Panel > System > Device Manager > Ports In this case, the port number is COM26. Press OK when you’re done and the port should automatically open if the port number is valid. There are indicators on the bottom tool-strip stating “COM26 Open” and the icon just above the debug window should look like this

.

CREATING A NEW PROJECT To create a new project, go to File > New Project. Keyboard Short-Cut: CTRL + N.

A new project will be automatically created for you, along with the standard structures of a program in the editor. A project consists of your code, which is contained in Modules. You will be writing your program in Modules. The Module which contains the subroutine ‘Main’, is your Main Module. Every Program MUST have a subroutine called Main(), and each subroutine has to have a unique name. TIP: You can rename your modules to whatever you want to call it. This can be done under: Project > Rename.


SAVING YOUR PROJECT Before continuing, lets save this project. This can be done under File > Save Project or clicking on the Save Icon on the toolbar. The Save Dialog should appear. Type in the project name that you would like to save as, e.g. “My Project” and hit the save button when you are done. Keyboard Short-Cut: CTRL + S.

COMPILING YOUR PROJECT You can now compile your project by selecting Project > Compile or clicking on the on the toolbar. Keyboard Short-Cut: F4.

Compile Icon

Compiling the project checks for any syntax errors in your program, you should not encounter any errors here. You can tell the number of errors you currently have, from the bottom indication in FIDE. For now, you should see something as follow.

COMPILING AND DOWNLOADING DOWNLOADING YOUR PROJECT Since there are no errors in our project, let’s download it into the FI. From the FIDE menu choose: Project > Compile And Download or press the icon on the tool bar. Keyboard Short-Cut: F5. You may have to wait for a moment for the download process to complete. Your download is successful if there are no errors reported. If you get an error message, such as: “Download Error” Check the following: • • •

Make sure your power supply is on. The power indicator on your FI board should light up. Make sure that the Comm.Key is connected properly to the FI board and to your PC. Make sure you have the right Comm Port setting.


Libraries FIDE comes ready with many libraries that support some common sensors and various E-Modules that AIS Cube produces. Among these are libraries for: • • •

DS1620 Temperature Sensor FI RTC (Real Time Clock) Module A.I 701 Serial Servo Motors

Other support that is already built into the FlamingICE Operating System include analog to digital conversion (ADC) for analog sensor readings, GLCD operating functions, Serial Port functions, PWM functions, etc. A full listing complete with code examples and descriptions of use can be found under “FIDE System Reference” which can be obtained from www.aiscube.com or under “My Documents > AIS Cube > Documentation” if you have already installed FIDE.

The DS1620 Temperature Sensor Library Getting a temperature reading from a DS1620 Sensor is as easy as initialising the sensor, calling the function ‘GETTEMPERATURE()’ and displaying the return value on the debug window. You can add the library to your project by selecting Project > Add Module and selecting LIB_DS1620. Note that the Library Module is now a part of your project. LIB_DS1620 Contains 2 Routines; •

• •

INIT_DS1620() GETTEMPERATURE()

As the routine name implies, INIT_DS1620() is used to initialise the temperature sensor. You must initialise the DS1620 before attempting to get a reading from it. Once you have initialized the sensor, display the temperature returned from the function GETTEMPERATURE().

The FI RTC (Real Time Clock) Module Library The FI RTC is located at the back of the GLCD + RTC Combo Module. Please refer to the PINOUTs for pin specification. You can add the RTC library to your project by selecting Project > Add Module and selecting LIB_RTC. Note that the Library Module is now a part of your project. LIB_RTC Contains 4 Routines; • RTC_READ_TIME •

• •

RTC_READ_TIME_EX RTC_READ_DATE RTC_SET_TIME_AND_DATE


To get the current time, use RTC_READ_TIME(HRS, MIN, SEC). The time in Hours, Minutes and Seconds will be returned in the HRS, MIN, SEC variable. You can display it in the debug window using the instruction Debug.Print.

CODE: Dim SEC, MIN, HRS As Integer Public Sub Main() RTC_READ_TIME(HRS, MIN, SEC) Debug.Print "DATE:"; CStr(HRS); ":"; CStr(MIN); ":"; CStr(SEC); " "; End Sub

For precise timing operations, you can use RTC_READ_TIME_EX(HRS, MIN, SEC, T10, T100) to get precision to a hundredth of a second. To get the current date, use RTC_READ_DATE(DAY, MTH, YRS) to return the date. To set the date and time for the RTC to start keeping track of, you can make use of the function specifying the hours, minutes, year, and month; RTC_SET_TIME_AND_DATE(HRS, MIN, YEARDATE, MTH). Note that you cannot set the seconds. Variables mentioned must be declared by the user.

CODE: Dim T10, T100, SEC, MIN, HRS, DAY, MTH, YEAR As Integer


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.