masa miya
/
GPIB_Controller
GPIB Controller
main.cpp
- Committer:
- jf1vrr
- Date:
- 2011-06-11
- Revision:
- 0:5a2a05d43d2a
File content as of revision 0:5a2a05d43d2a:
/* GPIB Adapter 2011/06/10 MLabo */ char init_msg1[]=" GPIB Cont.\n"; char init_msg2[]="V0.01 11/6 MLabo\n"; #include "mbed.h" #include "TextLCD.h" #include <GPIB_9914.h> TextLCD lcd(p24, p26, p27, p28, p29, p30); #define my_address 0 //My GPIB address int main() { int data_len; lcd.cls(); lcd.locate(0,0); lcd.printf(init_msg1); lcd.locate(0,1); lcd.printf(init_msg2); wait(1.0); lcd.cls(); GPIB_Init(my_address); GPIB_IFC(); while(1){ GPIB_REMOTE(23); GPIB_OUTPUT("F1 R2", 23); lcd.locate(0,0); lcd.printf("Get Message1! "); data_len = GPIB_ENTER(databuff, 23); lcd.locate(0,1); lcd.printf("%2d %s", data_len, databuff); GPIB_LOCAL(23); wait(1); }//while }//main //End