Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:43 29 Nov 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 : SetPin interrupt - won’t let me set it...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:51am 27 Feb 2014
Copy link to clipboard 
Print this post

It must be too late.

SETPIN D8,7,RESET 'RESET interrupt input pin(pull low to trip)

MMBasic rejects it saying invalid configuration.

Manual page 34 says that syntax is SETPIN pin, cfg, target.

  Quote  7 Interrupt on high to low input (pins 1 to 20, D0 to D8)

‘target' is the interrupt routine which can be a line number,label or user
defined subroutine.


At first I thought that 'RESET' might have been a reserved word, so tried something like REE, but that was rejected also for the same reason.

What am I doing wrong?

Time for bed anyway, and my brain can't work it out when I am tired... Edited by Grogster 2014-02-28
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 02:29am 27 Feb 2014
Copy link to clipboard 
Print this post

Is this on the Colour Maximite?

D8 is only valid on the Arduino connector of the CMM.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 11:00am 27 Feb 2014
Copy link to clipboard 
Print this post

Yes, CMM.
A CG CMM2.

Arduino connector pin "D8".

MMBasic version 4.4


Edited by Grogster 2014-02-28
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 11:46am 27 Feb 2014
Copy link to clipboard 
Print this post

Does it work if you the pin number.
D8 = 29

"You can use the labels D0, D1, etc in the SETPIN and PIN statements or you can use their corresponding
numbers (D0 = 21, D1 = 22, etc and A0 = 35, A1 = 36, etc)."


Jim

VK7JH
MMedit   MMBasic Help
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 12:10pm 27 Feb 2014
Copy link to clipboard 
Print this post

Ah, found it. It is a bug in the documentation - interrupts can only be set on the first eight digital pins on the Arduino connector and they are D0 to D7 (not D8).

Can you move your move your input to D7?

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 01:18pm 27 Feb 2014
Copy link to clipboard 
Print this post

Yes, I can move the reset switch to D7 no problems at all - thanks.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


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

© JAQ Software 2024