Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
from page 45 of the datasheet:
"Low-Voltage ICSP Programming (LVP) is enabled by default which disables the RB3 I/O function. LVP
must be disabled to enable RB3 as an I/O pin and allow maximum compatibility to the other 28-pin and
40-pin mid-range devices."
make sure you enabled RB3
in your original code, after the for loop is ended you are running on "random" code, therefore you can not know the behaviour. the return from the main is meaningless, you should not leave the main function.
maybe you get the error because the heap is larger than the MCU memory bank, sorry but i do not know how it is handled with the FreeRTOS on PIC. try looking for different memory models.
here is one way to do it (with known clock rate):
1) wait for a change on your rx line.
2) from the change 3/4 of the clock rate cycle.
3) get the Rx line level as data (1 or 0).
go back to step 1
- - - Updated - - -
hi, first, i think you should read one of the tutorials about interrupts found on the net.
after that configure one of your PIC timers to overflow every 1mSec and enable its interrupt.
than, in your main loop do something like this:
while(1) // continually
{
if (PORTA.f0) // if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.