![]() |
Forum Index : Microcontroller and PC projects : SerialTX/SerialRX on the 470 MM+...
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9643 |
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: AustraliaPosts: 3303 |
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 ZealandPosts: 9643 |
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: AustraliaPosts: 3303 |
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 ZealandPosts: 9643 |
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: SeychellesPosts: 128 |
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: AustraliaPosts: 3303 |
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 ZealandPosts: 9643 |
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! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |