BV501 and BVSerial April 20, 2014 07:20PM |
Registered: 11 years ago Posts: 13 |
Re: BV501 and BVSerial April 20, 2014 08:26PM |
Registered: 11 years ago Posts: 13 |
Re: BV501 and BVSerial April 21, 2014 10:43AM |
Admin Registered: 11 years ago Posts: 351 |
constant TRISCCLR 0xBF886214 constant LATCCLR 0xBF886234 constant LATCSET 0xBF886238 function digital_example() // set PORTC, 6,7,8,9 as O/P 11 1100 0000 @TRISCCLR = 0x3c0 // set pins as output @LATCCLR = 0xc0 // set RC6 & RC7 low @LATCSET = 0cc0 // set RC6 & RC7 high // adc inputs on RB13 and RB15 endfExample of how to set digital ports, more information http://www.pin1.org/gpeasy/index.php/Inputs This also contains information about setting the analogue inputs and reading ADC.