Jump to content
Sign in to follow this  

Inserting Asm Lines In Boostc

Recommended Posts

Really sorry for the wrong title mods and people.. Initially, when I typed this post, I thought that the programming was written in ASM.. but then I realised that the code was actually written in Pic Basic (I think).. I am new to the world of PIC programming....


-Original Message-


Below is a code to calculate the number of pulses and convert it into RPM to display in LCD.. If I am not mistaken, it is written in Pic Basic rite..? Can somebody please teach me how to convert it to C language (BoostC)..?



Device = 16F877

Xtal = 20


Dim Result as DWord

LCD_DTPIN = PORTB.4 ' Setup the LCD
LCD_TYPE = 0 '

All_Digital = True ' Make all pins Digital I/O's

While 1 = 1

Result = COUNTER PORTA.0, 100 ' Count how many pulses in 100mS

Result = Result * 10 * 60 ' Scale To RPM

Print at 1, 1, "RPM = ", DEC8 Result ' Display on the LCD

Wend ' Loop for ever

Edited by MrNobody

Share this post

Link to post
Share on other sites

There are to tools that convert basic into C (as far as I know). The best way is to understand how code works and than just code same functionality in C.




Share this post

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.

Sign in to follow this  

  • Create New...