101-0412 Rabbit Semiconductor, 101-0412 Datasheet - Page 83
101-0412
Manufacturer Part Number
101-0412
Description
INTERFACE PROG 12KEY DISP OP6700
Manufacturer
Rabbit Semiconductor
Datasheet
1.101-0412.pdf
(90 pages)
Specifications of 101-0412
Module/board Type
Single Board Computer Module
For Use With/related Products
OP6700
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
- Current page: 83 of 90
- Download datasheet (2Mb)
The numbers in the left margin are reference indicators, and are not a part of the code.
Load and run the program. Note that LED2 flashes once per second. Push button SW1
several times and note how LED1 is toggled.
The flashing of LED2 is performed by the costatement starting at the line marked (2). Cos-
tatements need to be executed regularly, often at least every 25 ms. To accomplish this, the
costatements are enclosed in a
to describe a style of real-time programming in which most operations are done in one loop.
The while loop starts at (1) and ends at (7).
User’s Manual
main() {
(1)
(2)
(3)
(4)
(5)
(6)
(7)
}
int vswitch;
WrPortI(PDDDR, &PDDDRShadow, 0x03); // set port D bits 0-1 as outputs
WrPortI(PDDCR, &PDDCRShadow, 0x00); // set port D to not open drain mode
vswitch = 0;
while (1) {
}
}
// First task will flash LED4 for 200 ms once per second.
// Second task - debounce SW1 and toggle vswitch
costate {
}
// make LED1 agree with vswitch
// end of main
costate {
BitWrPortI(PDDR, &PDDRShadow, vswitch, 0);
// end of while loop
BitWrPortI(PDDR, &PDDRShadow, 0xFF, 1);
BitWrPortI(PDDR, &PDDRShadow, 0x00, 1);
waitfor(DelayMs(800));
waitfor(DelayMs(50));
if(!BitRdPortI(PDDR, 2))
vswitch = !vswitch;
while (1) {
}
waitfor(DelayMs(200));
if (!BitRdPortI(PDDR, 2)) abort; // if button not down skip out
waitfor(!BitRdPortI(PDDR, 2));
waitfor(DelayMs(200));
if (!BitRdPortI(PDDR, 2))
break;
while
// state of virtual switch controlled by button S1
loop. The term
// if button still up break out of while loop
// end of costate
abort; // if button not still down exit
// toggle since button was down 50 ms
// initialize virtual switch as off
// endless loop
while
// wait 50 ms
// wait for button to go up
// wait additional 200 ms
loop is used as a handy way
// turn LED on
// turn LED off
// wait 800 ms
// wait 200 ms
79
Related parts for 101-0412
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
COMPUTER SNGLBD BL2101 A/D 0-10V
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
CARD D/A 0-10V SR9400 SMARTSTAR
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
CARD A/D 0-10V SR9300 SMARTSTAR
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
WiFi / 802.11 Modules & Development Tools WIRELESS CONTROL APP KIT
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
MODULE RABBITCORE RCM3720
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM3220
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
MODULE RABBITCORE RCM3210
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
COMPUTER SGL-BOARD OP6600 W/SRAM
Manufacturer:
Rabbit Semiconductor
Datasheet:
Part Number:
Description:
COMPUTER SGL-BD BL2000 SRAM/FLSH
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
COMPUTER SGL-BD BL2010 SRAM/FLSH
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
COMPUTER SGL-BD BL2000 SRAM/FLSH
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
COMPUTER SGL-BD BL2020 SRAM/FLSH
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
COMPUTER SGL-BRD BL2000 MEM/FLSH
Manufacturer:
Rabbit Semiconductor
Part Number:
Description:
COMPUTER SGL-BOARD FLASH&HEADERS
Manufacturer:
Rabbit Semiconductor