Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem with PIC24FJ32GA002

Status
Not open for further replies.

Diver300

Well-Known Member
Most Helpful Member
I have come across a problem with a PIC24FJ32GA002.

I need to rotate a bit into a 64 bit number. The 64 bit number is held in four 16 bit registers, with w3 pointing to the least significant one.

So I wrote:-

Code:
        repeat       #3
	rlc		[w3], [w3--]

That worked in the simulator but seems rotate in only zeros, when in the real PIC.

So I changed it to:-

Code:
        rlc		[w3], [w3--]
	rlc		[w3], [w3--]
	rlc		[w3], [w3--]
	rlc		[w3], [w3--]

Which seems to work fine.

Is there anything wrong with using the repeat command in this way?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top