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 StatesPosts: 2989 |
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 KingdomPosts: 8517 |
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 StatesPosts: 2989 |
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 StatesPosts: 2989 |
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: AustraliaPosts: 839 |
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 StatesPosts: 2989 |
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 KingdomPosts: 216 |
A useful addition to the manual - perhaps with a short additional preamble explanation? |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1321 |
Yes, I think that would be a good addition to the Manual too Gerry. Greg |
||||
Print this page |