Electronic Components Datasheet Search
  English  ▼

X  

DEV-12935 Datasheet(PDF) 4 Page - SparkFun Electronics

Part # DEV-12935
Description  FTDI SmartBasic Hookup Guide
PDF  5 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  SPARKFUN [SparkFun Electronics]
Direct Link  https://www.sparkfun.com/
Logo SPARKFUN - SparkFun Electronics

DEV-12935 Datasheet(HTML) 4 Page - SparkFun Electronics

  DEV-12935 Datasheet HTML 1Page - SparkFun Electronics DEV-12935 Datasheet HTML 2Page - SparkFun Electronics DEV-12935 Datasheet HTML 3Page - SparkFun Electronics DEV-12935 Datasheet HTML 4Page - SparkFun Electronics DEV-12935 Datasheet HTML 5Page - SparkFun Electronics  
Zoom Inzoom in Zoom Outzoom out
 4 / 5 page
background image
#define SEL 2  // When the SEL pin is held low, the data will 
be 
               //  routed to the PC via the USB­serial bridge. 
               //  That port is also the port used for program
ming 
               //  by the Arduino IDE. When in bootloading mod
e, a 
               //  pull­down resistor on the SmartBasic cause
s it 
               //  to remain in programming mode. 
#define ARDUINO_IDE   LOW  // Constants to make our routing ch
ange 
#define AUX_TERMINAL  HIGH //  more obvious. When the SEL pin 
is  
                           //  LOW, data is routed to the 
                           //  programming port. 
void setup() 
{ 
  Serial.begin(115200);    // Set up the hardware serial port. 
  pinMode(SEL, OUTPUT);    // Make the select line an outpu
t... 
  digitalWrite(SEL, ARDUINO_IDE); // ...and connect the board 
to 
                           //  the Arduino IDE's terminal.   
} 
void loop() 
{ 
  // The loop just says "Hello" to the two terminals, over and 
  //  over, forever. Note the use of the "flush()" function. I
f 
  //  omitted, the Arduino will re­route the serial data befor
e 
  //  the transmission has been completed; flush() causes the 
  //  Arduino to block until the serial data output buffer is 
  //  empty. Failure to use flush() will result in data being 
  //  sent to the wrong device, or to multiplexer changes duri
ng 
  //  transmission which may cause framing errors or data 
  //  corruption. *Always put in a flush() before you change 
  //  destination devices or disable the output.* 
  Serial.flush(); 
  digitalWrite(SEL, ARDUINO_IDE); 
  Serial.println("Hello, Arduino IDE!"); 
  // Swap to the non­Arduino terminal and say hello. 
  Serial.flush(); 
  digitalWrite(SEL, AUX_TERMINAL); 
  Serial.println("Hello, auxilliary terminal!"); 
  Serial.flush(); 
  delay(500); // This is a rate­limiter only. The temptation t
o use 
              //  delay() instead of flush() is strong, but fi
ght it. 
              //  If you use delay, you will *certainly* make 
a change 
              //  to the code which makes the original delay t
ime too 
              //  short for the new serial data stream, result
Page 4 of 5



Html Pages

1 2 3 4 5


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com