![]() |
Forum Index : Microcontroller and PC projects : CMM2: If you want a mouse
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Always have a spare can of smoke handy. If you let the smoke out, it will stop working... VK7JH MMedit |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Thanks - Attached (very very roughly with a mixture of paperclips, sticky tape and good luck). Miraculously I'm even getting data from it! |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Thanks - doh I did say I'm a total wiring newbie ![]() Always have a spare can of smoke handy. If you let the smoke out, it will stop working... Thanks - Attached (very very roughly with a mixture of paperclips, sticky tape and good luck). Miraculously I'm even getting data from it! OK. I got ambitious and tried to go I2C and now it doesn't work ![]() I know the answer is go back to serial, but where's the fun in that. USB Host - CMM2 GPIO 5V - Pin 2 (5V Power) 0V - Pin 6 (Ground) SDA / SDI - Pin 3 (I2C SDA) SCL / SCK - Pin 5 (I2C SCK) |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Did you use Peters example code? VK7JH MMedit |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Yes. Didn't see any values changing on movement even printing the input$ directly so I assumed my wiring was duff. I've swapped back over to serial which I can cope with but would love to know what I got wrong. Nothing soldered yet so nothing lost so far ![]() Edited 2020-10-08 09:38 by elk1984 |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
G'day all, I'm still looking at the Silicon Chip device. It looks like the PCB is available (Au$5 plus postage) plus the HEX files and Arduino source code for both mouse and keyboard variants. It uses a PIC32MX270F256B (DIL package). Now, I have plenty of 170s, and wondered if I could use one and then MMBasic direct?? BUT the 270 chip uses pin 23 for VUSB3v3 whereas the 170 has no such pin. It seems to me that anyone wanting to use the SC PCB is up for the 270 chip (and all the other components as there is not an SC kit - the PCB image can be purchased as a PDF for $3). But at least with the Arduino IDE and a PicKit one could program the chips? Are there any comments? I also see that the SC design uses pins 21 and 22 for USB D+ and D-. The USB is 5v but 21 and 22 are not 5v tolerant (they are on the 170)- isn't that a problem? Cheers, Andrew |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
The 270 chip has support for USB unlike the 170, and as it says in the article, it is a close relative of the chip used in Geoff's ASCII terminal. I bought the boards from Silicon Chip, the chips from RS and had the rest already. I programmed the chip with the Microbridge. The only annoyance is there are no mounting holes in the board. Bill Keep safe. Live long and prosper. |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Hi Bill, Does that mean you have MMBasic running on it or did you flash SC's code (ie .HEX) to it with the Microbridge? Cheers, Andrew Edited 2020-10-08 12:20 by Andrew_G |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Hi Andrew, I flashed SC's code into it but someone did compile MMBasic for it see here. It uses the USB for the console though and no later support. Bill Keep safe. Live long and prosper. |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Thanks Bill. That is very interesting. I'm not inclined to strike out on my own in using a 270 instead of a 170 for MMBasic - and I can fully appreciate that Geoff/Peter/et al have more than enough on their plates to be distracted. The simplest would appear to follow your lead and load SC's code onto their 270 & PCB. Cheers, Andrew |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Dumb question maybe, but for the device linked to, you would choose the USB Mouse option for the pre-installed software? Another question, reading through the thread and seeing the references to I2C, this could be wired up to an I2C connector and plugged into that port? I'm not a 'maker' type, but would love to have a mouse on my unit! Steve |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Steve Yes, that's the version I picked. It can be wired via Serial. I've tried i2C without much luck but I think that's because I can't get the wiring right. Eventually I was going to wire a nunchuk connector to the board. Can anyone help with the proper i2c wiring? Does anyone have a suggestion for a case to put the board into? |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Connect 5V from the CMM2 to 5V on the adapter board Connect GND from the CMM2 to GND on the adapter baord Connect pin 3 on the CMM2 to pin labelled SDA and SDI on the adapter board Connect pin 5 on the CMM2 to pin labelled SCL and SCK on the adapter board Pin 3 is bottom row one pin away from the VGA port Run the code I posted on page 1 of this thread |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Connect... Thanks Peter. Had another go and it's working like a charm! Edited 2020-10-10 02:28 by elk1984 |
||||
elk1984![]() Senior Member ![]() Joined: 11/07/2020 Location: United KingdomPosts: 228 |
Connect... Thanks Peter. Had another go and it's working like a charm! One last question. Do you know of any functions on that board to detect if a mouse is actually plugged in? Obviously when I query the i2c interface it shows connected even if no mouse is present. |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Connect... Thanks Peter. Had another go and it's working like a charm! One last question. Do you know of any functions on that board to detect if a mouse is actually plugged in? Obviously when I query the i2c interface it shows connected even if no mouse is present. Seems like there should be a way to determine if a mouse is connected....the device knows, but using the original code or the new mouse commands do not generate errors if no mouse is connected. This would require asking the user if a mouse is connected or not. Workable, but... Steve |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
No mouse = no movement. My HobbyTronics module has taken 21 days to get from UK to Melbourne. It will be another 7 to 14 days to swim across the creek to Tasmania and then I will be able to confirm. You may be able to hot plug. Jim VK7JH MMedit |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
My HobbyTronics module has taken 21 days to get from UK to Melbourne. It will be another 7 to 14 days to swim across the creek to Tasmania and then I will be able to confirm. You may be able to hot plug. Jim Yes, but how to tell a 'weak wrist' from no mouse at all? ![]() I suppose it's possible that the internal status that sets the LEDs is just not available from 'this' side. ![]() Steve |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2950 |
Hi All, Of course it would be a simple matter to use an extra IO pin as a digital input and monitor pin 14 of the chip on the HT board. If its High a Mouse has enumerated if its low No mouse connected or not talking. Kind Regards Mick Edited 2020-10-28 19:24 by bigmik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Of course it would be a simple matter to use an extra IO pin as a digital input and monitor pin 14 of the chip on the HT board. If its High a Mouse has enumerated if its low No mouse connected or not talking. Kind Regards Mick Perhaps, if my soldering ever improves to bad from terrible, I'll look into this. Steve |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |