Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:54 26 Nov 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 : Colour Maximite Pin 1

Author Message
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 04:14pm 13 Oct 2012
Copy link to clipboard 
Print this post

Hi

It seems I have stumbled across a strange problem or bug maybe?
I have loaded version 4 on a MM and the following works as expected


Setpin 1, 8
Start:
pin(1) = 1
pause 500
pin(1) = 0
pause 500
goto start


I have built two Colour Maximites and the both do not toggle pin 1 with the code above. Yet the following works as expected

Setpin 1, 2
Start:
? pin(1)
goto start


This problem only occurs with pin 1

Can somebody test this on a colour Maximite and confirm I have not gone crazy ?

Regards

John
Edited by jman 2012-10-15
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 04:58pm 13 Oct 2012
Copy link to clipboard 
Print this post

Pin 1 does not work at all on the UBW32 due to a design issue so it is possible that there is 'special' code for pin 1.
That makes it more likely that a bug could affect only pin 1.

Not a lot of help, sorry.

Jim

VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 09:15pm 13 Oct 2012
Copy link to clipboard 
Print this post

  jman said  

This problem only occurs with pin 1

Can somebody test this on a colour Maximite and confirm I have not gone crazy ?

Regards

John


Hi John,

Are you using the UBW32 as a colour Maximite?

If so what TassyJim says is sort of correct. However not all is lost ... the facts with the UBW32 is as follows.

If you used the native Bootloader of your UBW32 and flashed it with MMBasic 4 then Pin(1) will NOT work... This is because the UBW32 Native bootloader sets B5 (which is Pin-1) as a VBusOn signal and it cannot be changed via software.

However,

You CAN program the UBW32 with Geoffs Bootloader (comes included with MMbasic 4.0 in the CMM Constructors kit) but it requires a PicKit 3 to program it into the UBW32 but Pin(1) will work after that.

If you are not using a UBW32 then I am sorry I cant test for you as my CMM is based on a UBW32.

Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:37pm 13 Oct 2012
Copy link to clipboard 
Print this post

Hi Mick

Thanks for the reply but no I am using a CM made using a SC PCB


John
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 10:09pm 13 Oct 2012
Copy link to clipboard 
Print this post

  jman said  

Thanks for the reply but no I am using a CM made using a SC PCB

John


Hi John,

Ok then..

Just out of interest.. I tried both of your programs and they worked as expected on my UBW32 CMM

Hope someone else who doesnt have a UBW32 CMM can test it for you.

Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 12:55am 14 Oct 2012
Copy link to clipboard 
Print this post

It may be a dizzy output because of the rainbow of Color Maximite? Defective microcontrollers?
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 08:58am 14 Oct 2012
Copy link to clipboard 
Print this post

Hi John,

Can you try my TESTER3.Bas program?

2012-10-14_185056_tester3.zip

It requires my Test-A-Mite to run fully but you can duplicate this cct to test the Pin(1) only.




Then you can test Digital output and Digital Input..

This is how I tested your code. I am wondering if it may be configured for Open Collector output by mistake as my cct would still work if that was the case but a simple LED/Resistor may not.

Have you buzzed out the cct to neighboring pins looking for shorts?

Good luck

Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:45am 14 Oct 2012
Copy link to clipboard 
Print this post

Hi Mick

Thanks for this I will try it when I get home from work.
I have checked for shorts and it all looks clean.
I am driving a transistor to switch a relay
Input on pin(1) works so I assume cct is all good (but have checked)

Strange thing is both CM's ae doing it.

I have one of your PCB's for the UBW32 just waiting for some bits to arrive from Element14

Regards

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 10:34am 14 Oct 2012
Copy link to clipboard 
Print this post

  bigmik said   However not all is lost ... the facts with the UBW32 is as follows.

If you used the native Bootloader of your UBW32 and flashed it with MMBasic 4 then Pin(1) will NOT work... This is because the UBW32 Native bootloader sets B5 (which is Pin-1) as a VBusOn signal and it cannot be changed via software.

However,

You CAN program the UBW32 with Geoffs Bootloader (comes included with MMbasic 4.0 in the CMM Constructors kit) but it requires a PicKit 3 to program it into the UBW32 but Pin(1) will work after that.

Mick

That is nice to know. I was looking for an excuse to buy a PicKit 3.

Jim
VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 07:09pm 14 Oct 2012
Copy link to clipboard 
Print this post

  jman said  
I am driving a transistor to switch a relay
Input on pin(1) works so I assume cct is all good (but have checked)



Hi John,

Can you provide a cct of your relay drive just in case there is something wrong with your logic.. although you state that it works on the original MM.

Just out of interest have you plugged it into a VGA monitor? If it doesnt work in color then maybe you have flashed the mono-MM version of MMBasic 4 into it by mistake... It would still work (i think) via USB and TeraTerm but wont do the right things on the GPIO pins.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 07:31pm 14 Oct 2012
Copy link to clipboard 
Print this post

Hi John,

I just tried my UBW32 Colour MM and Pin(1) to see if it might actually be configured as Open Collector.

I just put an LED across GND and Pin(1), no pullup, and it works well so it must be configured correctly.

If you have flashed the correct MCC firmware into your boards I would lean towards a problem in your drive cct for your relays... and maybe it JUST works on the mono-MM by a whisker and is just lucky..

Anyway

Good luck

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 07:47pm 14 Oct 2012
Copy link to clipboard 
Print this post

Hi Mick

I have now tried you circuit and software and I get the same result.
Yip it is the correct firmware Colour works perfectly
I re-flashed the PIC just in case same result.

If I measure the voltage on pin(1) it always stays low the other pins go up to 3.3V as expected

Circuit below



one other observation if I read the pins as analog pin1 reads 0v
the other pins2-10 read 1.4v

Starting look like the PIC's are faulty but both ?

John Edited by jman 2012-10-16
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 07:58pm 14 Oct 2012
Copy link to clipboard 
Print this post

Hi John,

I cant fault that circuit... It SHOULD work so there must be something else wrong

If you have access to a pickit3 try flashing in this HEX file (which is the one I used on my UBW32) it was emailed to me directly by Geoff.

2012-10-15_055646_ColourMM_MMBasic_V4.0.zip

It may be that a config bit has been set incorrectly..

I am not really an expert with the programming of the Pic32 using the PicKit3 but I have done it several times. I know there are some config bits but i havent played around with them.

regards,

Mick

EDIT ***

You have the device set for the 795L version (not the 795H) I assume?

Mik
Edited by bigmik 2012-10-16
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:30pm 14 Oct 2012
Copy link to clipboard 
Print this post

Hi Mick

Yip device is correct
Here is a screen shot of the config bits
Only odd thing is I am using a Pickit 2 to do the programming




once again thanks for all the help

John
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:52pm 14 Oct 2012
Copy link to clipboard 
Print this post

We have a WINNER

I re-programmed the PIC using Pic32prog and now pin(1) works perfectly
config bits maybe ?

Thanks for all the help

John
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:15pm 14 Oct 2012
Copy link to clipboard 
Print this post

  jman said   We have a WINNER

I re-programmed the PIC using Pic32prog and now pin(1) works perfectly
config bits maybe ?

Thanks for all the help

John


Great news John,

I think i read somewhere that you need a pickit3 to program a pic32, as the pickit2 wouldnt do it.

Anyway you are there now.

Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 09:27am 15 Oct 2012
Copy link to clipboard 
Print this post

  bigmik said  
  jman said  

I re-programmed the PIC using Pic32prog and now pin(1) works perfectly



I think i read somewhere that you need a pickit3 to program a pic32, as the pickit2 wouldnt do it.


I did a google search and I think it is that MPLAB wont support Pickit2 to program the Pic32 chip... that Pic32 Programme does seem to be the way to go to use the Pickit2 and the Pic32 chip.

Anyway all working now and another lesson learned all round.

regards,

MickEdited by bigmik 2012-10-17
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Print this page


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

© JAQ Software 2024