|
Forum Index : Microcontroller and PC projects : MicroMite Interpreter : bug?
| Author | Message | ||||
| MustardMan Senior Member Joined: 30/08/2019 Location: AustraliaPosts: 175 |
Hi, Setup: Explore 100 v1D, Micromite Plus MMBasic Ver 5.05.01 Not the latest version, but is in an area not likely to be touched. I wanted to use the pad labelled "pin 51" on the PCB as a diagnostic output, since it was easily accessible. However when I went to 'SETPIN 51, DOUT' I got an error. I had the interpreter source so I wanted to find out why: the source had defined it as being input only. Fair enough, I know some pins on the PIC chips are input only. I went to the datasheet to check what it said as not that many pins are input only, and on the 100 pin chip it is listed as "USBID/RF3". Checking the source further I noted that "USBID/RF3" on the 64 pin chip is also defined as input only (it is pin 33). I can't verify for this chip as I don't have one, but it is likely the same as internal hardware as the 100 pin variant. Digging deeper into the datasheet, the "USBID/RF3" pin is completely capable of I/O. I altered the interpreter source just to see if I could use it for output (the acid test) and I could. Is this a bug, or was this done intentionally? Cheers, File: IOPorts.h Section: definition of PinDef64 and PinDef100 Current definition: { ADDR_PORTF, 3, DIGITAL_IN } Should be: { ADDR_PORTF, 3, DIGITAL_IN | DIGITAL_OUT } |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
From the data sheet: MMBasic does not use USBID so this pin can be used as an input. Interesting... I don't know quite what to make of this. It is unlike Microchip to make such an error. Perhaps when used as an output it does not meet an output's specs in some way. Thanks for the report. I would not class this as a bug and I plan to leave this I/O pin as it is. However, if it works for you then that is great. Geoff Geoff Graham - http://geoffg.net |
||||
| MustardMan Senior Member Joined: 30/08/2019 Location: AustraliaPosts: 175 |
No problems Geoff. After your comment about the datasheet I went back to check mine, and found I was looking at the datasheet for the PIC32MX5xx/6xx/7xx! That's a pretty bad oversight because I've been using it for months and never noticed! After that went back and downloaded the *correct* datasheet (PIC32MX330/350/370/430/450/470, DS60001185H). After shallow reading I didn't get the impression it was input only (pg156, pg271), but I must say it was a *very* shallow read and I'm absolutely sure you have read it in considerably more detail than I probably ever will! Please consider my post in error and no bug to report. Thanks, |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |