Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:08 01 Aug 2025 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 : Unexpected text

Author Message
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 01:36am 05 Mar 2018
Copy link to clipboard 
Print this post

I can't work out what is happening here.....

I've rebuilt a board for my garage door sensor project, and before I even enter much code am getting a frustrating error:

[1] SetPin 2,intl,button
Error: Unexpected text


This is the code.....

SetPin 2,intl,button
SetPin 14,dout
SetPin 25,dout


Sub button
End Sub

Pulse 25,1000
Pulse 14,1000


Any interrupt code I try and use returns this error.....
I can make the pin a digital input and it works ok.

This is a micromite 4.6 Beta 1 if that is important.....

 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 01:56am 05 Mar 2018
Copy link to clipboard 
Print this post

That should work OK.

"Error: Unexpected text" means that the interpreter ran into something in the command that should not be there. Perhaps you have some control characters embedded in there that is throwing it off.

The other point is that 4.6 Beta 1 was in the very early days of the MX170 Micromites and it had a lot of bugs. I cannot recall if one of the bugs affected interrupts but it is very possible.

Geoff
Geoff Graham - http://geoffg.net
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 02:05am 05 Mar 2018
Copy link to clipboard 
Print this post

I was just wondering that, about the beta status.... I'll clear out the editor and start again, if that doesn't work it sounds like I need to start desoldering a chip..... :(
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:09am 05 Mar 2018
Copy link to clipboard 
Print this post

  Lee3 said   it sounds like I need to start desoldering a chip..... :(


Why?
It is usually easy enough to flash the chip while in-circuit.

Jim
VK7JH
MMedit
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 02:46am 05 Mar 2018
Copy link to clipboard 
Print this post

I have no doubt.... if you have a 'flasher'....
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 04:12am 05 Mar 2018
Copy link to clipboard 
Print this post

Must have been a beta bug or something similar..... I desoldered it and dropped in a 4.5D chip I had, works perfectly.....
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 04:13am 05 Mar 2018
Copy link to clipboard 
Print this post

@ Lee3
Have a look at the Microbridge on Geoff's web page. If you cant build one yourself I'm sure someone will help you out.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 06:09am 05 Mar 2018
Copy link to clipboard 
Print this post

Thanks, I’ll certainly look into it, it doesn’t look too tricky...
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:13am 05 Mar 2018
Copy link to clipboard 
Print this post

ALWAYS design the ICSP into your boards.
Either that, or include the 1455 'MicroBridge' circuit as standard.
One or the other, otherwise you cannot update the firmware in-circuit as you have found out. Edited by Grogster 2018-03-06
Smoke makes things work. When the smoke gets out, it stops!
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 07:36am 05 Mar 2018
Copy link to clipboard 
Print this post

Or, failing that, use a socket rather than directly solder the chip.....
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 07:42am 05 Mar 2018
Copy link to clipboard 
Print this post

There's no problem with directly soldering.
All the SMD versions HAVE to be, really. Take the SSOP version.

The trick is to ensure you leave an ICSP header, or if not that, then the 1455 interface so that you can update MMBASIC via USB.

You obviously were able to replace the chip, so good on you.


Smoke makes things work. When the smoke gets out, it stops!
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 07:52am 05 Mar 2018
Copy link to clipboard 
Print this post

I must admit, I wasn't looking forward to removing the chip, but my spring loaded solder sucker did the job brilliantly. Didn't need *that* much force to pull it out afterwards.... :)

I'm looking into chip reprogramming now.... I'll have to add that to the repertoire.....
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 02:05pm 05 Mar 2018
Copy link to clipboard 
Print this post

you might like to have a look at the 'constructor guide' here:
http://www.thebackshed.com/docregister/ViewDoc.asp?DocID=19

it is the most basic/cheap pic32 programmer, an arduino nano + half a dozen parts that can be bought on ebay china for just a few dollars landed.


cheers,
rob :-)Edited by robert.rozee 2018-03-07
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 04:14pm 05 Mar 2018
Copy link to clipboard 
Print this post

or have a look at this.... Pretty cool stuff on his website as far as chip, programmers and SPEED!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:34pm 05 Mar 2018
Copy link to clipboard 
Print this post

  viscomjim said   or have a look at this.... Pretty cool stuff on his website as far as chip, programmers and SPEED!

It's essentially the same as the 1455 mentioned already except it's remarkably expensive whereas the 1455 is almost free.

John
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 01:06am 07 Mar 2018
Copy link to clipboard 
Print this post

I've opted for the easy path at this stage, and ordered a Microbridge kit from Silicon Chip.... Thanks for everyone's replies...
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 04:00am 07 Mar 2018
Copy link to clipboard 
Print this post

@ Lee3
When you have the Microbridge up and running download Robert Rozee's 'Picprog GUI' either from SC or RictechNZ which is Grogster's site. It makes flashing the chip a breeze. Thanks robert.rozee for making things so simple.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Lee3
Regular Member

Joined: 17/09/2014
Location: Australia
Posts: 57
Posted: 04:09am 07 Mar 2018
Copy link to clipboard 
Print this post

I use a Mac, so it probably won't be as simple.... There does seem to be ports for pic32prog around, I just need to work out what I need first!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 04:48am 07 Mar 2018
Copy link to clipboard 
Print this post

I suppose Mac's have their drawbacks but at least you don't have to put up with Win10
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025