Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:33 05 Dec 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : help pls cannot get this ticker to flip

Author Message
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 05:57am 30 Jun 2011
Copy link to clipboard 
Print this post

55 CLS
90 SETPIN 11,3
100 SETPIN 1,1 PIN 1 'set as input
125 SETPIN 10,8 PIN 10 'set as output
130 REM
470 REM SETTICK 100,1000 'start timer in 100ms
490 ' Normal Program. do stuff
510 'On Time, 10ms
520 REM SETTICK 10,2000
540 PIN(10)=1
560 REM IRETURN
580 REM
700 'Off Time, 100ms
720 REM SETTICK 100,1000
740 PIN(10)=0
760 REM IRETURN
780 REM
820 temp = 0
826 ?
840 FOR I = 1 TO 500
860 temp1 =PIN(1)
880 temp = temp + temp1
900 NEXT I
910 LOCATE 5,0
920 ? ,, temp /(0.0185) / 500
925 ?
930 LOCATE 10,50
940 ? ,"THE BATTERIES ARE"
941 ?
942 REM LOCATE 10,0
947 ? ," AT THIS VOLTAGE"
960 LOCATE 1500,120
980 ? " THE FREQUENCY OUTPUT IS ";PIN(11);"Hz "
985 ?
990 ? " SQUARE WAVE"
1200 GOTO 820

the rem statements are so i can still run the freq counter and the voltmeter ...both are displayed in txt form on the screen ...
but the settick program wont run so i placed it as the first program to run then the volt meter then the freq counter problems in the ticcker it puts the output of a pin hig then low basically a square wave out but i cannot get it to run ....
any help answers would bee appreiaciated ...thank you ...regards ...
technicians do it with least resistance
 
VK6MRG

Guru

Joined: 08/06/2011
Location: Australia
Posts: 347
Posted: 06:22am 30 Jun 2011
Copy link to clipboard 
Print this post

Why have you got the 1500 in this line? 960 LOCATE 1500,120
Should this be 150?
Its easier to ask forgiveness than to seek permission!

............VK6MRG.............VK3MGR............
 
VK6MRG

Guru

Joined: 08/06/2011
Location: Australia
Posts: 347
Posted: 07:09am 30 Jun 2011
Copy link to clipboard 
Print this post

VGA output
X axis 0 to 480
Y axis 0 to 432

LOCATE X,Y
Its easier to ask forgiveness than to seek permission!

............VK6MRG.............VK3MGR............
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 07:19am 30 Jun 2011
Copy link to clipboard 
Print this post

Sparky,

Is it that you are trying to generate a square wave?

If so then maybe something like

4 pinstate = 1
5 setpin 10,8 'pin 10 as output
10 settick 10,1000
20 rem main program
30 rem doing stuff
40
60
900 goto 20
1000 rem square wave on pin 10 at set tick interval
1010 pinstate = not(pinstate)
1020 pin(10) = pinstate
1099 ireturn

I tried the above with pin 0, the power light, instead of pin 10 and with a interval of 100 it flashes away nicely.

Regards,
Anthony.


 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 09:51am 30 Jun 2011
Copy link to clipboard 
Print this post

thank you i will try it tomorrow ..when my cro probe arrrives....i want to run a flip flop or a square wave signal typically making it adjustable in the off and off states and also adjustable freqency ...its to run my inverter ..at present i have a 555 timer driving a 4013 cmos giving a flip flop out put from the 4013 then driving a couple of tip 31`s and then driving a couple of 2n3055`s then driving 10 2n3055`s per winding its centre tapped so the positive comes through the 1000 va transformer and the 3055 switch the negative on and of if you understand how this works basically if i can get a square wave at a pre settable freq then i can feed it to an astable 55 timmer then adjust the mark space rsatio as well as the freqency...regards sparkey....
technicians do it with least resistance
 
VK6MRG

Guru

Joined: 08/06/2011
Location: Australia
Posts: 347
Posted: 10:19am 30 Jun 2011
Copy link to clipboard 
Print this post

oops, sorry, wrong spot.
Edited by VK6MRG 2011-07-01
Its easier to ask forgiveness than to seek permission!

............VK6MRG.............VK3MGR............
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 10:46am 30 Jun 2011
Copy link to clipboard 
Print this post

Sparky,

I think I got it :-)

Maybe you can set a pulse width with the following added to my first example.
3 pwm = 0
4 pinstate = 1
5 setpin 10,8 'pin 10 as output
10 settick 10,1000
15 settick 10,2000 'you can only have one settick at a time, this one overrides any other, it would be nice to have more. GG??
20 rem main program
30 rem doing stuff
40
60
900 goto 20

1000 rem square wave on pin 10 at set tick interval
1010 pinstate = not(pinstate)
1020 pin(10) = pinstate
1099 ireturn

2000 rem pwm on pin0, flash the power light (or other digital pin)
2010 pwm=pwm+1: if pwm=100 then pwm=1 'adjust pwm=100 and settick interval to set freq
2010 if pwm<=3 then pin(0)=1 else pin(0)=0 'adjust pwm<=3 to set pulse width this will give 3 on in 100
2020 ireturn

Regards,
Anthony.


 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 10:30am 01 Jul 2011
Copy link to clipboard 
Print this post

thanks anthony i will try it over the week end ..have to do a lot of clearing out electronic stuff /hard whare ..first i only have a small bedroom its not easy when you dont have space to work but i will try it now i have my cro probe and some connectors and some cable order came in from altri\onics today ...nothing like new bits to play with i also have a "v2" expander board so \this will help...thanks brian...
technicians do it with least resistance
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024