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.

looping problems using picbasicpro

Status
Not open for further replies.

pouchito

New Member
hi all,

please i need your help using picbasic pro

i want to add the number x=1 with the following numbers

for i=0 to i=100

and i want to display the result on an LCD

i must check if the result is greater than 1500, the loop must exit and the final number will be frozen on the LCD or disappeared.

What is happening is that the loop when it reaches 1500 it is restarting automatically, please can anyone help me by writing the corresponding code using picbasic pro


thanks in advance
 
You r right, but the problem is that i forgot the code at home, and i am trying to benefit from the user experience maybe they faced similar problem.
 
pouchito said:
you are totally right.

it is 50 and not 1500 , i made a unacceptable mistake

hi pouchito,
Does your Basic have 'Do While' or 'Do Until' Loops?
If so, lookup some of these types of Looping examples.

If not,look at 'For X=...... Next', 'If X= ... then Exit For'

Regards
 
thanks a lot, i will try to work on it,
i think i m facing a problem cz in the other part of my project, i m reading t\from the serial ...i will try to post my code so you can correct me
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top