Jump to content
Sign in to follow this  
mgitzlaff

If..then Or Do...while Interrupt Evals

Recommended Posts

Hi,

 

I have been struggling with BoostBasic when it comes to interrupt evaluations. I have been trying to use an Evaluation Statement like this:

 

If (pir1.TXIF = 1) Then....

 

Or:

 

txreg = 82

 

Do

.

.

.

Loop Until (pir1.TXIF = 1)

 

Using the 877A, the documentation for the TXIF bit says that hardware determines it's state and it is not software setable/resetable. So using it in a straightforward method like in the Do statement above, I would expect that the DO Loop will continue until the byte is fully transmitted and the buffer would be empty again. The empty buffer would trigger the setting of the TXIF bit and only allow the program execution to leave the Do-Until Loop when the txreg buffer is empty. What I find is that a hyperterminal screen formatting ESC Sequence will not properly execute with the above code. Placing one millisecond delays in place of the Do-Until Loop makes the code execute properly. I would much rather use the uP interrupt abilities. I have noticed that other people use an evaluation of the entire 8-bit register of pir1 and bit-and (mask) to determine a single bit's state. Does the compiler interpret this in a different way? I was going to examine the Assembly code generated to determine if the compiler is interpretting things differently.

 

Also, one other question....does BoostBasic support printf? It does not appear to.

 

Thanks in Advance!

 

Mike

Share this post


Link to post
Share on other sites

Mike,

 

What I find is that a hyperterminal screen formatting ESC Sequence will not properly execute with the above code. Placing one millisecond delays in place of the Do-Until Loop makes the code execute properly.
Its sounds like your code is doing exactly the righ thing. The problem is probably at the hyperterminal end, maybe there is insufficient delay detween the end of one byte and the start of the next, if this is the case hyperterminal may not sync correctly onto the first bit of each byte of data.

 

does BoostBasic support printf? It does not appear to.
If it did it would be called print, but currently it does not. You will have to write your own functions for this :(

 

Regards

Dave

Share this post


Link to post
Share on other sites

Thanks Dave for the info and quick reply.

 

Are there plans to add functions like "print"?

 

Is there a projection yet as to when BoostBasic would release to a for sale version?

Share this post


Link to post
Share on other sites

Mike,

 

Are there plans to add functions like "print"?
The plans here are somewhat driven by users. No doubt we will add some way of generating formated output.

 

Is there a projection yet as to when BoostBasic would release to a for sale version?
No dates have been set, but we have had very little negative feedback, things are looking quite stable.

Would you want to buy as it is now?

 

Regards

Dave

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.

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...