My project with PICDEM 2 PLUS DEMO BOARD, VC++ in windows 7. For communication with code and PIC board, I used UART/USB cable (USB serial port8). So far , I am able to connect with the PIC board and also able to receive/transmit data. But I want to use the Prolific USB to Serial Com Port. I tried every possible way(found in internet) like to update driver, change port number(initially when I connected with the Prolific cable, it takes the port4 automatically). Place the FTD2XX.dll file. But nothing help me out from this error. Below is the error
Unhandled exception at 0x00316329 in MovingArmProject.exe: 0xC0000005: Access violation reading location 0x00000000.
Here is a snap of my code, where it gives the error…
bool SerialCommunicator::SerialRx(void) {
//the function to be called by the receiver thread
BYTE buf[1024*8];
unsigned int read;
static UINT16 crc;
static UINT8 ptr_rxd_buffer = 0;
UINT8 crc1, crc2;
UINT8 c;
do
{
read = port->ReadAvailable(buf,1000); // catch the received bytes, read= nb of received bytes in th buffer buf
for( unsigned int k =0; k0); //end of do/while
return 0;
}
Here the error is given
read = port->ReadAvailable(buf,1000); // catch the received bytes, read= nb of received bytes in th buffer buf
Will be highly grateful If someone helps me out from this. Really in big problem
Thanks