UIC00B stepping non stop and finally MPLAB IDE hang

Programmer, In-Circuit Debugger, PIC Start-Up Kit, Memory Interface...

UIC00B stepping non stop and finally MPLAB IDE hang

Postby khmok » Fri Mar 29, 2013 3:22 pm

Hi,

When I step through my code, I noticed that when come to bit shifting (data >> = 1), the UIC00B will step non-stop and finally hang.
Refer my code below.

Do you encounter the same thing? Please give some advice how to solve this.

CODE: SELECT_ALL_CODE
void OWWriteByte(int data)
{
   int i = 0;

   // Loop to write each bit in the byte, LS-bit first
   for (i= 0; i < 8; i++)
   {   
      OWWriteBit(data & 0x01);
      
      // shift the data byte for the next bit
      data >> = 1;
   }   
}
khmok
Newbie
 
Posts: 13
Joined: Fri Mar 08, 2013 6:08 pm

Re: UIC00B stepping non stop and finally MPLAB IDE hang

Postby robosang » Tue Apr 02, 2013 10:43 pm

what does "data >> = 1" means?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: UIC00B stepping non stop and finally MPLAB IDE hang

Postby Brian Griffin » Wed Apr 03, 2013 12:08 am

data >>= 1 is also:

data = data >> 1

:)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am


Return to PIC Development Tool

Who is online

Users browsing this forum: No registered users and 6 guests

cron