Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:28 06 Jul 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 : Programming 32MX170F

Author Message
TREVINSK
Newbie

Joined: 12/06/2016
Location: Australia
Posts: 4
Posted: 10:59pm 21 Jun 2016
Copy link to clipboard 
Print this post

I am seeking advice re programming the PIC322MX Micromite as per Geoff's Projects and Silicon Chip articles. I have absolute minimal knowledge of the Personal Computer(PC) and the PIC32 but have general electronic experience. It is believed the Micromite is programmed OK as the IPE screen tells me so and two chips have been programmed. However, when attempting to utilise the CP2102 consoles (Silabs, and again I have tried two) the Tera Term and MM Edit emulators suggest there is some connection between the emulator, the CP2102 and the Micromite but the transfer of program data fails. The serial COM port appears OK at 38400 Baud rate, no parity and no stop bit. Neither emulator wants to operate as expected from the Silicon Chip/Geoff's Projects articles, which I interpret as an indication that there is no data connection between the emulator, the PC, the CP2102 and the Micromite. A driver for the CP2102 was installed in the PC but I have no means of knowing how the CP2102 and the Driver connect. Any advice would be appreciated.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10213
Posted: 11:20pm 21 Jun 2016
Copy link to clipboard 
Print this post

Start by checking the CP2102. Connect the TX and RX pins on the CP2102 together and then go into teraterm. Type a few characters and they should echo. If that works you know that the connection to the PC is correct.

How is the Micromite wired? Make sure you have all the connections shown on page 9 of the Micromite manual correct.
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 04:33am 22 Jun 2016
Copy link to clipboard 
Print this post

@trevisk

I had similar problem with W10 installed driver. I suggest to download driver from Silab. Work fine for 2102 and 2104 chip.
 
TREVINSK
Newbie

Joined: 12/06/2016
Location: Australia
Posts: 4
Posted: 10:10pm 22 Jun 2016
Copy link to clipboard 
Print this post

Hello Matherp and Boss,
Thanks for your quick responses; the programming board accords with the referenced diagram. Tried connecting the Tx/Rx pins - no joy. My gut feeling is that the issue is one (or more) inside the PC, or perhaps the CP2102 units sourced from China. Have reloaded drivers and programs for the Silab CP2102 but to no avail. Windows Device Manager tells me both CP2102's (in turn) are satisfactory!!!. Tera Term is able to discriminate between a connected and a disconnected CP2102. That said, I am wary of the Tera Term presentation. It does not present in the manner shown in the Micromite manual. Maybe the presentation is influenced by the presence of a connected Micromite. Edited by TREVINSK 2016-06-24
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10213
Posted: 10:29pm 22 Jun 2016
Copy link to clipboard 
Print this post

  Quote  Tried connecting the Tx/Rx pins - no joy


Until you get this working the Micromite is irrelevant. This should work with nothing connected to the CP2012, just TX and RX bridged.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:45pm 22 Jun 2016
Copy link to clipboard 
Print this post

I have seen some weird things relating to USB/3, with devices often not behaving as expected.

Swapping to USB/2 often resolves the issue.

Both my laptops have both 2 & 3 and in some hardware configurations I think there is an additional driver layer.

Cheers.
 
TREVINSK
Newbie

Joined: 12/06/2016
Location: Australia
Posts: 4
Posted: 10:19pm 25 Jun 2016
Copy link to clipboard 
Print this post

My thanks to all who contributed. Following Matherp's lead I find the Tera Term screen will only show keyboard characters when the CP2102 is plugged in AND (a) either the shorting clip is insitu between the CP2102 TX/Rx pins, OR (b) the PIC32 is connected to the CP2102. Removing the CP2102 from the USB port prevents keyboard characters appearing on the Tera Term screen. My education re the PC progresses slowly.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:13pm 25 Jun 2016
Copy link to clipboard 
Print this post

Maybe what you were expecting to see is initially is what's referred to as "Local Echo".

That's where what you type is displayed on the screen AND sent out the device port.
What you type is displayed regardless of whether or not it gets to the receiving device.


What Matherp suggested, is referred to as "Loop Back".

So what happens is you type a character, it does not show on the screen, just goes out the serial port.....

But as the TX & RX are now bridged, it comes back in again & is hence displayed on the screen, and instantly

Once you are connected to the MicroMite a similar thing happens, a character goes out, the MM receives it & sends the same character back to be displayed on the screen, acknowledging that it received what you sent it.

Hope that helps with an overall understanding.

Cheers.

 
TREVINSK
Newbie

Joined: 12/06/2016
Location: Australia
Posts: 4
Posted: 02:32am 26 Jun 2016
Copy link to clipboard 
Print this post

Good evening Phil23,

Thanks for your response and description. As stated in my initial message, I am coming from a zero base of information and experience in respect of the PC and how it operates. Given that the loop back test seems OK, the next logical step is to determine whether data is arriving at the PIC32. I have previously checked out the various connections to the PIC, in terms of continuity, but maybe the oscilloscope needs to be dusted off. I will be tied up for a few days so will have time to think before I get to the next episode. Thanks again for your response. Cheers.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10213
Posted: 02:52am 26 Jun 2016
Copy link to clipboard 
Print this post

  Quote  but maybe the oscilloscope needs to be dusted off


If you have a scope that makes diagnosis easy.

First, leave the serial port disconnected. Power up the Micromite with the scope on pin 11 with a trigger set at about 1.5V and you should see a sequence of bits triggering the scope as the Micromite outputs its Copyright Banner.

If this doesn't happen there must be a wiring issue on the Micromite or it wasn't programmed correctly. Normal things to check are the capacitor on VCAP (lots of threads on what works best). Have a look at this thread for my personal approach on a breadboard. Also the connections to pins 27 and 28 are critical.

If you do see the output then it must be the link to the CP2102. In which case make sure RX and TX are the right way round (RX on the CP2102 connects to TX on the Micromite) and the grounds are connected.

It is always best to use a three wire connection (RX, TX, GND) to the USB adapter and have a separate 3.3V power supply to the Micromite.

Then with the scope connected to pin 12 press and hold any key in Teraterm and you should see the bit sequence arriving.
 
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