Need help with dspic33FJ64MC802

Status
Not open for further replies.

gabloo

New Member
Hey guys, I hope i post my question in right place. I am a college student and barely have any knowledge about using mplab and microchip but I do have C++ coding experience. My instructor is asking me to build a project using one of the micro chip and we decided to create soil moisture censor using dspic33f. What i don't understand how do i define output and input of chip. All i wanted to do is, when we get sudden voltage out of sensor, i want to run my motor. Before, i wrote actual code, i wrote follow very simple code.

All i wanted to do is make my led shine out of B15 pin. What am i doing it wrong?


#include "p33Fxxxx.h"
int main(void)
{
while (1)
{
_ODCB15 = 1;
_TRISB15= 0;
_LATB15 = 1; }
return 0; }


Thanks in advance,
KoKo
 
I figured it out about LED part but I am stuck at putting voltage input into my chip.

What i m trying to do is, if chip pick up sudden voltage from sensor, it will turn on the led. How kind of coding do i need so that chip will read voltage input and convert it to digital.


Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…