Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:51 18 Sep 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 : SerialTX/SerialRX on the 470 MM+...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 05:23pm 15 Sep 2015
Copy link to clipboard 
Print this post

Hi there.

I have run out of serial ports, so wondering if the SerialTX and SerialRX Cfunctions can work on the 64-pin MM+ chip?

The PDF for the functions shows pins you can use for the 28 and 44 pin chips, but not the 64 pin chip.

Can I use these Cfunctions on the 64, and if so, which pins are valid?
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3303
Posted: 08:37pm 15 Sep 2015
Copy link to clipboard 
Print this post

The latest versions of the SerialTx an SerialRx CFunctions can work with any I/O pin and should work on the MM+ (untested at this stage).

Here they are:
2015-09-16_063403_SerialTx.pdf
2015-09-16_063436_SerialRx.pdf
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 08:54pm 15 Sep 2015
Copy link to clipboard 
Print this post

Sweet!

I will load them up and run some tests. It is the TX one I want the most.
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3303
Posted: 09:00pm 15 Sep 2015
Copy link to clipboard 
Print this post

Tx is the easiest to use.
Let us know how it works.
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 09:31pm 15 Sep 2015
Copy link to clipboard 
Print this post

SerialTX works fine on pin8 of the 470 @ 19k2 baud. I am going to try a few other pins, but I expect that if it works on any one pin, it SHOULD work on any other valid I/O pin. 19k2 is what I need, to drive one of those wee thermal printers I have previously posted about. I will post back here with anything of interest.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 07:06pm 06 Nov 2015
Copy link to clipboard 
Print this post

Have not played with Micromites for a while.

Is SerialRX Cfunction interrupt or polling driven?

If not interrupt driven then not very useful unless you know exactly when to receive data. Would it be possible to implement interrupt mode through firmware down the track as with hardware serial ports or using existing pin interrupt to monitor change state on RX pin (Cfunction serial port)?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3303
Posted: 11:09pm 06 Nov 2015
Copy link to clipboard 
Print this post

They are polled. There are no more hardware ports (except for the 100-pin chip).
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 11:11pm 06 Nov 2015
Copy link to clipboard 
Print this post

The Cfunction RX is not interrupt or poll driven that I am aware of.
It is easy to add that though, provided you have one spare I/O pin.
Setup the I/O pin as an interrupt, and in that interrupt, call the Cfunction RX routine.

However, that is again only useful if you know when to expect data. The nice thing about the native serial ports is the automatic buffering of data and buffer-driven interrupts. I expect that is what you were referring to anyway.

I expect that this is not possible though, due to a lack of hardware UART's. I would expect that the serial port buffering is done at hardware level by the PIC32's UART modules, and I think they are all assigned.

EDIT: Geoff beat me! Edited by Grogster 2015-11-08
Smoke makes things work. When the smoke gets out, it stops!
 
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