Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:23 17 May 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 : Micromite Pin X is reserved on startup?

Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5036
Posted: 04:09pm 13 Aug 2017
Copy link to clipboard 
Print this post

Hiya

Building a controller based on a Micromite ver 5 and a 20x4 LCD. I've needed to use pretty much every pin on the Micromite. First thing I've done is tested the LCD, if I cant get that working on the pins I've put aside then its a day wasted.

The manual says any I/O pin can be used. I'm using 22,21,16 and 15 for D4 to D7, 7 for RS and 23 for EN.

When I go to initialise the LCD using LCD INIT 22,21,16,15,7,23 I got a "Pin 15 is reserved on startup". Thats the D7 line. I changed that to pin 5. Retested, I got a "Pin 7 is reserved on startup", the RS line. Kept trying, I also found pins 4, 3 and 2 are also reserved on startup?

I gave up, either I'm missing something obvious or "Any I/O pin" is not entirely correct.

Just adding, there is no code before this initialising line.

Any suggestions?

Glenn

Edited by Gizmo 2017-08-15
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9081
Posted: 04:22pm 13 Aug 2017
Copy link to clipboard 
Print this post

I assume this is a 28-pin chip not the 64 or 100 pin SMD chips, yes?
Smoke makes things work. When the smoke gets out, it stops!
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 04:24pm 13 Aug 2017
Copy link to clipboard 
Print this post

Have you tried doing an 'OPTION LIST' to see if the MM has been previously configured with anything?

Cheers,

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9081
Posted: 04:26pm 13 Aug 2017
Copy link to clipboard 
Print this post

Looking at your configuration commands again - any I/O pin can be used, but you CANNOT use pins that have been assigned to other tasks. So in your case, you have assigned the 20x4 LCD to pins that you are then trying to assign to the SPI LCD, and that is why the MM chip is moaning - you have a conflict of interest there.

IE, once you assign pins 22,21,16 and 15 for D4 to D7, 7 for RS and 23 for EN to the 20x4 LCD, you then CAN'T use those pins for anything else, as you have assigned them to the LCD.
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9081
Posted: 04:29pm 13 Aug 2017
Copy link to clipboard 
Print this post

Wait a minute - I think I am reading that wrong - sorry.....

...to be continued....

EDIT: Yes, I am reading that wrong, sorry.

As posted above, type OPTION LIST and see what is currently in there as pre-saved configurations, then OPTION x DISABLE each one till they are ALL disabled, then any/all reserved pins should be released, and then you should be able to setup the LCD using the pins you specify - unless something else weird is going on.Edited by Grogster 2017-08-15
Smoke makes things work. When the smoke gets out, it stops!
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5036
Posted: 04:38pm 13 Aug 2017
Copy link to clipboard 
Print this post

Bingo, that was it. The chip had been configured for the LCD panel. Had to disable the LCDPANEL and TOUCH.

Thanks for your help.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9081
Posted: 04:39pm 13 Aug 2017
Copy link to clipboard 
Print this post

Awesome.

Sorry for almost putting you on the wrong track there. For some reason I thought you were trying to use both a 40x4 LCD and also an SPI LCD at the same time.

WHY I thought that is anyone's guess!!!
Smoke makes things work. When the smoke gets out, it stops!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:25pm 14 Aug 2017
Copy link to clipboard 
Print this post

Hi Glenn,

Have you seen this post?

Would save you a few pins on the 28 pin chip.

I got a few of the PCF8574 controllers @ a buck or so each.
Get to reclaim 4 pins!

Phil.
 
Print this page


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

© JAQ Software 2024