20
1 PLX-DAQ: (Works but it’s Limited). p.02 Getting Setup files and brief over view of PLX-DAQ. p.03 Arduino source code and notes concerning same. p.04 Excel data sheet containing VB code allowing Arduino data acquisition. PROCESSING: p.05 Arduino and processing: set-up files, Arduino & P2 source code. p.06 Changing the 32bit data bus. p.07 Generating real time log file. p.08 Excel data sheet generated (log file). p.09 Collection of Arduino Ports used and plan to include LCD display. p.10 Details on the SPLC780D LCD display, Arduino LCD code to drive it. P.11-13 Tying 74LS164 shift register to Arduino. p.14 Recap of ports used and program references. p.15-16 Use of BT_BOARD v1.04. p.17 -18 74LS157 DataSheet & 74LS164 DataSheet p.19+ More Stuff: Collection of notes. 1 Arduino Real Time Data The Mission is to monitor an electronic test bench to include: Read/Display 16 analog values. Read/Decode 14 Digital pin bus for clock control. Read/Write a 32 bit bus by nibbles. Generate a data log View/Interact via a PC. Display bench (BOX) values on a LCD display and PC. Add WiFi via BT_BOARD V1.04.

PLX-DAQ: (Works but it’s Limited). p.02 Getting Setup files and brief over view of PLX-DAQ. p.03 Arduino source code and notes concerning same

  • Upload
    mada

  • View
    85

  • Download
    8

Embed Size (px)

DESCRIPTION

Arduino Real Time Data. The Mission is to monitor an electronic test bench to include: Read/Display 16 analog values. Read/Decode 14 Digital pin bus for clock control. Read/Write a 32 bit bus by nibbles. Generate a data log View/Interact via a PC. - PowerPoint PPT Presentation

Citation preview

Page 1: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

1

PLX-DAQ: (Works but it’s Limited).p.02 Getting Setup files and brief over view of PLX-DAQ.p.03 Arduino source code and notes concerning same.p.04 Excel data sheet containing VB code allowing Arduino data acquisition.

PROCESSING:p.05 Arduino and processing: set-up files, Arduino & P2 source code.p.06 Changing the 32bit data bus.p.07 Generating real time log file.p.08 Excel data sheet generated (log file).p.09 Collection of Arduino Ports used and plan to include LCD display.p.10 Details on the SPLC780D LCD display, Arduino LCD code to drive it.P.11-13 Tying 74LS164 shift register to Arduino.p.14 Recap of ports used and program references.p.15-16 Use of BT_BOARD v1.04.p.17 -18 74LS157 DataSheet & 74LS164 DataSheetp.19+ More Stuff: Collection of notes. 1

Arduino Real Time DataThe Mission is to monitor an electronic test bench to include:• Read/Display 16 analog values.• Read/Decode 14 Digital pin bus for clock control.• Read/Write a 32 bit bus by nibbles.• Generate a data log• View/Interact via a PC.• Display bench (BOX) values on a LCD display and PC.• Add WiFi via BT_BOARD V1.04.

Page 2: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

2

PLX-DAQ Set-Up: Getting Necessary Files

• Download Arduino Mega2560: http://arduino.cc/en/Main/ArduinoBoardMega2560

• Download Arduino Processing: http://playground.arduino.cc/Interfacing/Processing Note: This was done but not employed. Firmata DB was for UNO.• Download PLX-DAQ: http://www.parallax.com/tabid/393/Default.aspx• Blog on PLX-DAQ-n-Arduino: http://robottini.altervista.org/arduino-and-real-time-charts-in-excel

LABLE - Used to define the column headings. Syntax: Serial.println (“LABEL, INT_COLUMN”); DATE, TIME - Allows the serial port to send data to Excel. Syntax: Serial.print (“DATE, TIME,”); Serial.println (val); Note: Serial.print (“DATE, TIME,”) must be used before each Serial.println(); ROW, SET, k, - This allows control over the row that excel accepts data. Syntax: Serial.println(ROW, SET, #); The column control: Serial.print(“,”) ; Like CSV

Brief PLX-DAQ Code Used in Arduino Sketches. I think this all of it:

Page 3: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

3

Short Ardunio Script Placing Arduino Reads into Excel Meter Open Document TextDouble click to open, 233 line sketch, reading analog pins A(15:0] and sending it to ECEL. Need win2k or better.14 bit decode of up/dwn counters to display CLK, and write A5A5 to nibs 7:4 and read that into nibs 3:0.Use bench_mon.xlsm found in PLX-DAQ.

ECEL SnapshotNOTES:The Arduino code writes to columns 1-3 (A-C) and ECEL maps columns B to G and to C to I .Column A is the “DATA, TIME, “ This is needed to have EXCEL read the incoming data.

8 Nibs can be read or written: pic shows a write of A5A5 and reading same. The value to R/W is CSV file read by script.

The frequency will be the decode of up/down counters used to generate CLOCK with base frequency of either 10 or 20 MHZ crystal module and I really need the “BOX” to finish this.

Reads of 12 analog ports with wait of 5mS B/W reads plus 40mS at end of reads allows about 10 reads/s. The box colors are based on the data received , set in EXCEL. Supply : 0<=5V consider a 5% de-rating. Supply >5v are a 10% de-rating. All values read outside their de-rating show RED.

The voltages monitored were 5V, 3.3V and 0V and the one pot V- OUT seen in the V-V supply where the color green/red was base on value V>= 0 = green and anything else is red.

All current values were tied to 0V where 0-0.9 = green and any measurement above or below this range is red. The Measured value has no constraints and will always be green.Must! open xcel to blank sheet. Connect to data port then move meter sheet to first page (blank out Meter).

                           Supplies       5V 5.00 V 0.00 mA                             12V 3.44 V 0.00 mA                             V-V 2.26 V 0.00 mA                             N12V 4.99 V 0.00 mA   

Measured 

        A1-2 0.00 V 5.00 V                             A3-4 0.00 V 5.00 V                             A5-6 0.00 V 5.00 V                             A7-8 5.00 V 5.00 V   

Main Clock 

        BASE 10.00 MHZ    CLK 813.74 HZ      NIBS [15:0]             Data R - - - - H A 5 A 5 H                             Data W A 5 A 5 H - - - - H                                                    

Box7_ino.txt

Page 4: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

4

EXCEL Data Sheet Used

This is the excel DB used. The DATE,TIME, field A1 , measured value 1-2=B2-3.You must use the downloaded excel worksheet it contains VB code that allows Arduino access, or this one. Sheet : bench_mon2.xlsm.

10:15:41 AM 5.00 0.0010:15:41 AM 3.44 0.0010:15:41 AM 2.26 0.0010:15:41 AM 5.00 0.00 5V V mA10:15:41 AM 0.00 5.0010:15:41 AM 0.00 4.99 12V V mA10:15:40 AM 0.00 4.9910:15:40 AM 5.00 5.00 V-V V mA10:15:40 AM 1.22 kHZ 10 MHZ10:15:40 AM - - - - A 5 A 5 N12V V mA10:15:41 AM A 5 A 5 - - - -

A1-2 V V

A3-4 V V

A5-6 V V

A7-8 V V

BASE MHZ CLK kHZ

Data R - - - - H A 5 A 5 H

Data W A 5 A 5 H - - - - H

THE BOX

Main Clock

Measured

Supplies

2.26

3.44

5.00

5.00

0.00

0.00

0.00

0.00

5.000.00

0.00

0.00

5.00

NIBS [15:0]

4.99

10.001.22

4.99

5.00

Page 5: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

5

ARDUINO & PROCESSINGDownload Processing:http://processing.orgDownload Arduino Processing: http://playground.arduino.cc/Interfacing/ProcessingCopy folder Arduino to processing folder C:\downloads\processing-2.0.1-windows32\processing-2.0.1\modes\java\librariesEnter processing and add font: “Arial-BoldMT-14”, <Tools><Create Font>Add sketch box_proc_pde.txt making the box.

Click R-W to change the 32 bit bus status.Click Log to allow data log.

Add patch to Arduino IDE.See More Stuff: ending pgs..

box_proc_pde.txt

box_proc_ino.txt

Page 6: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

6

Change The 32 Bit Bus

The meter will default to all read: r,r,r,r,r,r,r,r . Click R-W and the box below will pop-up, make your entry and click OK. The board is currently wired upper 2 bytes to the lower 2 bytes, so it will read what it writes.

Page 7: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

7

Data Log

Click the Log button and the box below will pop-up suggesting a file name of the current date and time.Accept it or change to your preference. This will write out a CSV file containing the measurements and settings of the box.

Page 8: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

8

CSV File

5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.22 1.02 2.44 1.02 1.01 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ

Page 9: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

9

The Box Settings and Ports used, also the plan to include SPLC870D LCD Display Add Chars 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9

Idenity ~Value chars Duib Port I/O Port Chars Units Space( ) 5 . 0 0 V 1 6 5 m A 1 2 . 3 5 V 1 6 5 m A 6 0 H Z5V 5.00 4 A0 1 A0 4 V 2 1 5 . 0 0 V 1 6 5 m A ~ 1 2 . 1 5 V 1 6 5 m A 0 . 0 1 4 6 H Z

5V_I 1.65 4 A1 1 A1 4 165 mA 3 0 . 0 1 V 0 . 0 2 V 0 . 0 3 V 0 . 0 4 V R > ~ ~ ~ ~ A B C D H12V 8.25 5 A2 1 A2 5 V 2 0 . 0 5 V 0 . 0 6 V 0 . 0 7 V 0 . 0 8 V W > A B C D ~ ~ ~ ~ H

12V_I 1.65 4 A3 1 A3 4 165 mA 3V-V 14.96 5 A4 1 A4 5 V 2 0 10 20 30 40

V-V_I 1.65 4 A5 1 A5 4 165 mA 3N12V 3.96 5 A6 1 A6 5 V 2

N12V_I 1.65 4 A7 1 A7 4 165 mA 3A0 1.65 4 A8 1 A8 4 V 2A1 1.65 4 A9 1 A9 4 V 2A2 5.00 4 A10 1 A10 4 V 2 CHARS PORTSA3 5.00 4 A11 1 A11 4 V 2 105 62A4 3.33 4 A12 1 A12 4 V 2A5 3.33 4 A13 1 A13 4 V 2A6 5.00 4 A14 1 A14 4 V 2A7 4.99 4 A15 1 A15 4 V 2CLK 610.39 6 D[13:2,14,15] 14 6 0

FREQ HZ 3 - 0 kHZ 4BASE 10 2 - 2 3FREQ MHZ 3 - 0 MHZ 4NR7 F 1 D[52,50,48,46] 4 4 R 2NR6 F 1 D[44,42,40,38] 4 4 0NR5 F 1 D[36,34,32,30] 4 4 0NR4 F 1 D[28,26,24,22] 4 4 0NR3 F 1 D[53,51,49,47] 4 4 0NR2 F 1 D[45,43,41,39] 4 4 0NR1 F 1 D[37,35,33,31] 4 4 0 CharsNR0 F 1 D[29,27,25,23] 4 4 H 2 158NW7 - 1 D[52,50,48,46] 4 4 W 2NW6 - 1 D[44,42,40,38] 4 4 0NW5 - 1 D[36,34,32,30] 4 4 0NW4 - 1 D[28,26,24,22] 4 4 0NW3 - 1 D[53,51,49,47] 4 4 0NW2 - 1 D[45,43,41,39] 4 4 0NW1 - 1 D[37,35,33,31] 4 4 0NW0 - 1 D[29,27,25,23] 4 4 H 2 194R-W7 r 1 -R-W6 r 1 -R-W5 r 1 -R-W4 r 1 -R-W3 r 1 -R-W2 r 1 -R-W1 r 1 -R-R0 r 1 -

62

CSV CNT S1

Serial2 Port

Serial Port

SPLC Charactor Chart

BOX0UC(V,mA,V,mA,BS,V,mA,V,mA,C) 15 CharsBOX0UP( 5,12,20,27,30,45,52,60,67,69)

BOX1UC(V,V,V,V,R>,H,V,V,V,V,W>,H) 14 CharsBOX1UP( 5,12,20,27,30,39,45,52,60,67,70,79)

BOX0DM(5,4,5,4,2,3,5,4,6,4,7,3)BOX0DP( 4,10,19,25,33,39,44,50,59,65,76,79)

BOX1DM(5,5,5,5,8,5,5,5,5,8)BOX1DP( 4,11,19,26,38,44,51,59,66,78)

Page 10: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

10

SPLC780D/74LS164

1

16

1718

Pin/Signal Wire1 DB7 Blue Solid2 DB6 Blue Striped3 DB5 Brown Solid4 DB4 Brown Striped5 DB3 Blue Solid6 DB2 Blue Striped7 DB1 Brown Solid8 DB0 Brown Striped9 E1 Blue Solid10 R/W Blue Striped11 RS Green Solid12 V0 Green Striped13 VSS Green Striped& Solid14 VDD Orange Solid15 E2 Orange Striped16 NC17 LEDA Orange Solid18 LEDK Green Solid

Connector DB6 -2 1-DB7 DB4 -4 3-DB5 DB2 -6 5-DB3 DB0 -8 7-DB1 R/W-10 9-E1 V0-12 11-RS VDD-14 13-VSS NC-16 15-E2

17 LEDA 5V18 LEDK GND

Lcd_ino.txt Lcd2_ino.txt

Arduino source code driving LCD. Lcd2 uses on change write

SPLAC780D DATA SHEETS

http://www.datasheet4u.com/datasheet/S/P/L/SPLC780D_SunplusTechnology.pdf.html

Page 11: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

11

SPLC780D HOOK-UP

VO, Was Designed to tie through a 10k pot to GND.R/W=0=Write; RS=0=INS

LEDA 5VLEDK GND

1

16

1718

74LS164

16-R_S 21-E120-E219-R_W18-D_I17-CK

Arduino pins used as digital outputs:D[21:16] .

DB7 -1 2 -DB6 DB5 -3 4 -DB4 DB3 -5 6 -DB2 DB1 -7 8 -DB0 E1 -9 10 -R/W RS -11 12 -VO VSS -13 14 -VDD E2 -15 16 -NC

RAILS

5V

GND

Page 12: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

12

Free-up RX/TX3 To Include BT_BOARD V1.04

12

RAILS

5V

GND

VO, Was Designed to tie through a 10k pot to GND.R/W=0=Write; RS=0=INS

LEDA 5VLEDK GND

1

16

1718

74LS164

16-R_S

19-E

Arduino pins used as digital outputs:D[19:16] .

DB7 -1 2- DB6 DB5 -3 4- DB4 DB3 -5 6- DB2 DB1 -7 8- DB0 E1 -9 10- R/W RS -11 12- VO VSS -13 14- VDD E2 -15 16- NC

18-D_I

17-CK

2:1

R/W

2:1

E2E1

¼ 74LS157

Page 13: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

13

LCD DISPLAY

Page 14: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

14

PORTS/PINS/PROGRAM_VAR_NAME

PIN PIN-CNT PROGRAM COMMENTS

A0-15 16 voltage[15:0] Analog read with limits set for disp. color53,51,49,…,23 16 RWPorts[53,…,23] Digital pins set for R/W52,50,48,…,22 16 RWPorts[52,…,22] Digital pins set for R/WPWM[13:2] 12 DP[13:2] Used as dital pins to decode CLK up/dn counter (TX/RX)0 1,0 2 NONE USB PORT

(TX/RX)3 15,14 2 RXD/TXD Drive BT_BOARDSB[1:0] Select base frequency(20MHZ,1MHZ,1kHZ,60HZ)

TX2-16 1 R_S LCD drive RS pinRX2-17 1 CK LCD drive CK on the 74LS164 shift register.TX1-18 1 D_I LCD drive A-B on 74LS164 (data, enable).RX1-19 1 E LCD drive E[2:1] on SPLC780D

R_W LCD Drive R/WSDA/SCL-21:20 2 SB[1:0] Select base frequency(20MHZ,1MHZ,1kHZ,60HZ)

E[2:1] Drive LCD E2:1.70 Pins used.

Arduino Data Sheet http://www.robotshop.com/media/files/PDF/ArduinoMega2560Datasheet.pdf

The PDF file is huge! 8g so it was removed and replaced by the pointer above.

See p.11, 6 pin LCD See p.12, 4 pin LCD

Page 15: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

15

BT_BOARD V1.04Industrial serial port Bluetooth, Drop-in replacement for wired serial connections, transparent usage. You can use it simply for a serial port replacement to establish connection between MCU and GPS, PC to your embedded project and etc.Computer and peripheral devicesGPS receiverIndustrial controlMCU projectsDefault serial port setting : 9600 1Pairing code : 1234Running in slave role: Pair with BT dongle and master moduleUsageCoupled Mode: Two modules will establish communication automatically when powered. PC hosted mode: Pair the module with Bluetooth dongle directly as virtual serial.Bluetooth protocol : Bluetooth Specification v2.0+EDRFrequency : 2.4GHz ISM bandModulation : GFSK(Gaussian Frequency Shift Keying)Emission power : <=4dBm, Class 2Sensitivity : <=-84dBm at 0.1% BERSpeed : Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1MbpsSecurity : Authentication and encryptionProfiles : Bluetooth serial portCSR chip : Bluetooth v2.0Wave band : 2.4GHz-2.8GHz, ISM BandProtocol : Bluetooth V2.0Power Class : (+6dbm)Reception sensitivity: -85dBm* Voltage : 3.3 (2.7V-4.2V) ** NOT CORRECT Current : Paring - 35mA, Connected - 8mATemperature : -40~ +105 Degrees CelsiusUser defined Baud rate : 4800, 9600, 19200, 38400, 57600, 115200, 230400,460800,921600,1382400.Dimension : 26.9mm*13mm*2.2mm

* Correspondence with seller: VCC < 7V If VCC = 5V then RX/TX will achieve TTL 5V levels.

Page 16: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

1616

BT_BOARD V1.04

Pin definition :PIO8 connects with LED cathodea with 470ohm series resistor in between. LED NEGATIVE connects to ground. It is used to indicate the module state. After powered on, flashing intervals differ in different states.PIO9 is used to control LED indicating paring. It will be steady on when paring is successful.PIO11, module state switching pin. HIGH -> response to AT command; LOW or floating -> regular work status.With build-in reset circuit, reset is completed automatically after powered on.Steps to set to MASTER:Set PIO11 HIGH with a 10K resistor in between.Power on, module comes into AT Command Response Status Open HyperTerminal or other serial tool, set the baud rate 38400, 8 data bits, 1 stop bit, no parity bit, no Flow Control Via serial port, send characters "AT + ROLE = 1 r n", if successful, return "OK r n", where r n is carriage return.Set PIO11 LOW, re-power, then in Master state, automatically search for slave module and connect.

Page 17: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

17

2:1 Mux 74LS157

Page 18: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

18

Shift Register 74LS164

Page 19: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

19

Some Extra Stuff

1. P.5 Arduino & Processing . Add Patch to allow String2Float and Float2String conversion. See blog http://www.timewasters-place.com/arduino-string-and-float/ Replace C:/Program Files/Arduino/hardware/arduino/cores/arduino/Wstring.[h,cpp] with those from site.

Float_Patch_for_Arduino_1.0.3.zip

String example1 = String(1.852); // Equals: "1.852000"        example1 = String(1.852, 2); // Equals: "1.85" String example2 = String(example1.toFloat() * 1.784561, 4); // Equals: "3.3014"        example1 = example2 + 1.58356; // Equals: "3.30141.583560", since the example2 variable is of type String the number gets converted into String and concatenated.

This is patch for Arduino 1.03-1.05 releases. The next releases from Arduino are 1.5.# not yet made public.This was an attempt to make writes more stable, however; it behaved the same.

2. The PLX-DAQ works well but does not allow any other interaction than reporting collected data. It’s fast and easily but limited.

3. The current LCD display is power starved (driven by USB). Once better rails are applied POTS will be added to VO and A-K, allowing Variable back light intensity and the correct contrast. This will sharpen the LCD appearance.

4. Will use 6 pins digital P16-21, which will drive LS74164 and SPLC780d. The E[2:1] and RW connections are not necessary; adding various external logic will eliminate E[2:1] and RW is always tied LOW, write. Change to 4 pin interface, p.12 .

5. The LCD has 2 font capabilities 5x10 & 5x7 ;how ever, only the 5x10 display can be chosen. I also had problem selecting the desired cursor control. Wanted to just move cursor to a given address and write backwards (w/o shifting the display). This would have made printing to LCD cleaner, all values to LCD and PC are String values and keeping decimal place works best right to left. I was able to set up close to this but cursor movement is left to right. The need to write to specific locations allows print on change and also a non-flashy display. The LCD display looks just like the Processing BOX on the PC just not quite as fast.

6. Future plan is to add another MEGA to work in tandem as both master and slave Would like to control clock frequency based on data, as well as alter PWM to several servo’s based on data. Not yet clear but RX/TX3 can readily be reassigned and the 32 bit bus may also play a role B/W the two. I’m leaning toward receiving info via the digital write to the LCD and possible returning info via RX/TX3.

Page 20: PLX-DAQ:  (Works but it’s Limited). p.02    Getting Setup files and brief over view of PLX-DAQ. p.03    Arduino source code and notes concerning same

20

More Stuff

7. Will eliminate Arduino’s pin 19, program name E which drives the LCD capture clock. Using a counter clocked by CK, a count of 8 will clock E. TTL logic 74LS163 a 4 bit binary counter and will be decoded by 8. May seem asynchronous but not, it’s in correct time frame.