Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:09 29 Mar 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 : Can DI, DO be made available for F4 SPI2 pins as on CMM2?

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:12pm 08 Apr 2021
Copy link to clipboard 
Print this post

On the CMM2, this works:

MMBasic Version 5.07.00b26
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> setpin 37,din: setpin 38,dout: setpin 40,dout

You can flash leds, etc.

But on the F4:

> ARMmite MMBasic Version 5.07.00b9
Copyright 2011-2020 Geoff Graham
Copyright 2016-2020 Peter Mather

> setpin 53,dout
Error : Pin | is reserved on startup
> setpin 52,dout
Error : Pin | is reserved on startup
> setpin 54,dout
Error : Pin | is reserved on startup

For compatibility, can the functionality be provided on the F4 or are there other reasons (interference with other functions) which prevent it?

~
Edited 2021-04-08 22:13 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8517
Posted: 12:22pm 08 Apr 2021
Copy link to clipboard 
Print this post

They are available if you disable touch.

OPTION TOUCH DISABLE
Edited 2021-04-08 22:25 by matherp
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:31pm 08 Apr 2021
Copy link to clipboard 
Print this post

  matherp said  They are available if you disable touch.


Ah, ok. I have an LCD on which touch has ceased working, so I can try it there.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:04am 09 Apr 2021
Copy link to clipboard 
Print this post

That worked, thank you.

Is the reason that SPI2 pins MOSI, MISO, and CLOCK (54/PB15, 53/PB14, and 52/PB13) cannot be accessed as Digital I/O pins when TOUCH is enabled because the touch pin (PB12) interferes with them, or they with it?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 839
Posted: 12:37am 09 Apr 2021
Copy link to clipboard 
Print this post

When Touch is enabled then SPI2 is also enabled, so it needs to reserve the pins. The touch chip on the LCD need to be queried using SPI2 to find out where the touch occurred. T_IRQ can only tell you its been touched. Disabling Touch will disable SPI2 and free up the pins unless its an SPI type LCD panel which also needs the SPI2.
Latest F4 Latest H7
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 02:31am 09 Apr 2021
Copy link to clipboard 
Print this post

  disco4now said  When Touch is enabled then SPI2 is also enabled, so it needs to reserve the pins.


Ah, makes sense. Thanks. Too bad, though, that more complete compatibility with the CMM2 is not possible.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 216
Posted: 06:36am 09 Apr 2021
Copy link to clipboard 
Print this post

  disco4now said  When Touch is enabled then SPI2 is also enabled, so it needs to reserve the pins. The touch chip on the LCD need to be queried using SPI2 to find out where the touch occurred. T_IRQ can only tell you its been touched. Disabling Touch will disable SPI2 and free up the pins unless its an SPI type LCD panel which also needs the SPI2.


A useful addition to the manual - perhaps with a short additional preamble explanation?
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1321
Posted: 10:56am 11 Apr 2021
Copy link to clipboard 
Print this post

Yes, I think that would be a good addition to the Manual too Gerry.

Greg
 
Print this page


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

© JAQ Software 2024