Armmite - STM32H7: Developments


Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3176
Posted: 05:48am 14 Jun 2018      

TONE works from the command line but I am having problems when it is in a program.

There should be a tone when the blue button is pressed.
  Quote   'nucleo tests
SETPIN 7, DIN ' pushbutton 1 (Blue)
SETPIN 137, DOUT ' blue LED
SETPIN 75, DOUT ' red LED
SETPIN 46, DOUT ' green LED
DO
IF PIN(7) = 1 THEN

x =
1 - x
PIN(137) = x
PIN(75) = 1 - x
PULSE 46, 50
PRINT "tone"
PLAY TONE 1000,2000,200
PRINT "Tone OFF"
PAUSE 200
ENDIF
'PRINT x
PAUSE 100
LOOP


The program locks up and I have to RESET to recover.

Jim

It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm