Jump to content

Pic18 Sleep Function

Recommended Posts

Sleep function inserts a no-op in the assembly code rather than 0003 op code


#include <system.h>


void main(void)










0004 main

; { main ; function begin

0004 label268435976

0004 0000 SLEEP

0006 EF02F000 GOTO label268435976

; } main function end


Sleep should be 0003.


Same happens if you use


asm sleep


Inserting data to make the sleep op code is a work around:


asm data 0,3


IDE 5.9.5

BoostC 2.2 beta


Window OS






Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...