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.
drkl Senior Member Joined: 18/10/2015 Location: HungaryPosts: 102
Posted: 10:18pm 17 Mar 2016
Copy link to clipboard
Print this post
Help!
I try to use the sw spiport, but i got an error message under
program loading:
CPU exception #7 (bus error on load or store)
In CFunction SPIPort at address 0x0160
Processor restarted
I use: MM44, VER5.1
Other question:
It is possible to define the sw spi to the original spi pins?
drkl
drkl Senior Member Joined: 18/10/2015 Location: HungaryPosts: 102
Posted: 07:47am 18 Mar 2016
Copy link to clipboard
Print this post
Hello,
Have anybody used the sw spiport command?
drkl
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 327
Posted: 08:45am 18 Mar 2016
Copy link to clipboard
Print this post
All I can say is that I have tried the software SPIport and it worked for me. However, when I tried it I used a 28 pin Micromite and didn't test it on the same pins as the hardware SPI port. At the moment I don't have a Micromite with me to test with, but I will test it when I get home.
--CurtisI am not a Mad Scientist... It makes me happy inventing new ways to take over the world!!
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9585
Posted: 03:16pm 18 Mar 2016
Copy link to clipboard
Print this post
If you ARE trying to configure the SW SPI port to use the native SPI port pins, I would expect that to be a rather large no-no, and I would therefore completely expect that to throw an error. The SW ports - all of them(SPI, I2C, Serial) are designed to use normal I/O pins and not ever be configured to use the native port pins as supported by MMBASIC.
Assuming you are NOT setting up the SW SPI port to use the native SPI port pins, and you are still getting that error, then that is something I would not expect, and have not seen myself.
Can you please clarify if indeed you are trying to use the SW SPI port, on the native SPI port pins - SPI1 (or SPI2 if MM+).Smoke makes things work. When the smoke gets out, it stops!
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 327
Posted: 03:51pm 18 Mar 2016
Copy link to clipboard
Print this post
Found my original test program and it works perfectly on a 28 pin Micromite using the same pins as the hardware SPI port. I even opened the hardware SPI port first then closed it and was able to use the software SPI port. Attempting to use the software SPI port while the hardware port was still open did not cause an error but it also did not work. Unfortunately I do not have a 44 pin chip to test on, but I really believe you probably have a problem with your SPI parameters.
--CurtisI am not a Mad Scientist... It makes me happy inventing new ways to take over the world!!
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9585
Posted: 06:12pm 18 Mar 2016
Copy link to clipboard
Print this post
I stand corrected. I would have thought that to be a no-no as I mentioned, but I was obviously wrong there, so you can ignore my post above.Smoke makes things work. When the smoke gets out, it stops!
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 327
Posted: 06:39pm 18 Mar 2016
Copy link to clipboard
Print this post
I would have been surprised if those pins had not worked. The SPI pins are also digital I/O pins and that is what the software SPI requires. I'm sure the software SPI returned a error code when I tried access the already open hardware SPI pins, but I never bothered to check for it.
--CurtisI am not a Mad Scientist... It makes me happy inventing new ways to take over the world!!
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9585
Posted: 10:06pm 18 Mar 2016
Copy link to clipboard
Print this post
==== POST DELETED BY GROGSTER ====
(duplicate. did not spot the post above - have been having trouble posting. forums kept timing out - seems OK now...)Edited by Grogster 2016-03-20Smoke makes things work. When the smoke gets out, it stops!