Bypic code March 04, 2013 11:27PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code March 07, 2013 09:48AM |
Admin Registered: 11 years ago Posts: 351 |
// Simple LED flasher for BV513 // // This selects the action type constant CLR 4 constant SET 8 constant INV 12 // The LED is conneted to RC15 constant LED 1 << 15 // this is the port constant LEDTRIS 0xBF886080 // this is TRISC constant LEDLAT 0xBF8860A0 // this is LATC // ***************************************************************************** // Flash on board, BV513 LED 10 times // ***************************************************************************** function flash() dim j // first set up the port that the LED is on poke(LEDTRIS+CLR,LED) // set to output // Now flash the led for j = 1 to 10 poke(LEDLAT+INV,LED) wait(100) next endf
Re: Bypic code March 07, 2013 11:34PM |
Registered: 11 years ago Posts: 17 |
SD card files March 13, 2013 11:40PM |
Registered: 11 years ago Posts: 17 |
Re: SD card files March 16, 2013 08:43PM |
Registered: 11 years ago Posts: 17 |
Re: SD card files March 18, 2013 02:02PM |
Admin Registered: 11 years ago Posts: 351 |
function main() bv513_rts() endf
Re: Bypic code March 18, 2013 09:41PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code March 22, 2013 11:48PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code March 23, 2013 07:24AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code March 23, 2013 10:46PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code April 27, 2013 10:26PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code April 28, 2013 09:04AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code April 28, 2013 11:22PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code April 29, 2013 07:45AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code May 24, 2013 07:59PM |
Registered: 10 years ago Posts: 2 |
Re: Bypic code May 24, 2013 11:36PM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code May 25, 2013 06:48AM |
Registered: 10 years ago Posts: 2 |
Re: Bypic code May 26, 2013 06:19PM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code June 11, 2013 10:23PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code June 12, 2013 08:25AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code June 12, 2013 10:25PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code June 13, 2013 11:11PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code June 18, 2013 04:33PM |
Admin Registered: 11 years ago Posts: 351 |
Re: Bypic code September 29, 2013 09:59PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code September 30, 2013 07:20AM |
Admin Registered: 11 years ago Posts: 18 |
function twotimes(value) return value * 2 endf function test() print twotimes(5) endf
Re: Bypic code September 30, 2013 09:36PM |
Registered: 11 years ago Posts: 17 |
//KeyPad Initialissation constant AD1PCFG% 0xbf809060 constant CPNUE% 0xbf8861e0 dim kp_count, kp_value, kp_ibptr, kp_obptr,kbuf(31) // Initialise ports including setting the AtoD channels // to digital function kp_start() //poke(AD1PCFG%+8)=0x0f // just set the ones used //poke(CPNUE%+8)=0x3c // weak pull ups on CN5:2 io_pinMode(PORTB,0,IN, WPU) // port b 3:0 = i/p io_pinMode(PORTB,1,IN, WPU) // port b 3:0 = i/p io_pinMode(PORTB,2,IN, WPU) // port b 3:0 = i/p io_pinMode(PORTB,3,IN, WPU) // port b 3:0 = i/p io_pinMode(PORTE,5,OUT, WOFF) // port e 5:7 = o/p io_pinMode(PORTE,6,OUT, WOFF) // port e 5:7 = o/p io_pinMode(PORTE,7,OUT, WOFF) // port e 5:7 = o/p //portw "etc" 0xe0 // port e 7:5 = o/p //portw "eos" 0xe0 // all high io_setPort(PORTE,0xe0) endf // scans the keypad by successively lowering the column // and checking port b for not being all high // returns a code based on the input #option echo on function kp_scan() dim i,p,r for i=1 to 3 io_write(PORTE,4+i,LOW) p=io_read(PORTB,i) p = p & 0x0f io_write(PORTB,4+i,HIGH) // col 5-7 high if p <> 0x0f then break endif next r=p*i*i print r return r endf
Re: Bypic code October 01, 2013 07:31AM |
Admin Registered: 11 years ago Posts: 18 |
Re: Bypic code October 02, 2013 10:51PM |
Registered: 11 years ago Posts: 17 |
Re: Bypic code October 29, 2013 04:31PM |
Registered: 10 years ago Posts: 7 |