Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Micromite MX270 v5.03.02 Post ReplyPost New Topic
<< Prev Page of 3 Next >>
Author
Message << Prev Topic | Next Topic >>
jman
Guru
Guru
Avatar

Joined: 12 June 2011
Location: New Zealand
Online Status: Offline
Posts: 687
Posted: 04 April 2017 at 7:38pm | IP Logged Quote jman

Hi
Thanks for this kiiid and jwaldha (for the 28 pin version)
Time to spin up a 28pin version. This will be great for projects where the pin usage is not a concern.

Regards
Jman


Back to Top View jman's Profile Search for other posts by jman
 
Zonker
Guru
Guru
Avatar

Joined: 18 August 2012
Location: United States
Online Status: Offline
Posts: 702
Posted: 04 April 2017 at 9:00pm | IP Logged Quote Zonker

Wow..!!

Thanks, Gents... This 28 pinner (and 44) USB firmware is a good addition (imho)

All the source code gurus deserve a big "tip of the hat"

Back to Top View Zonker's Profile Search for other posts by Zonker
 
jwaldha
Newbie
Newbie


Joined: 14 January 2016
Location: Hungary
Online Status: Offline
Posts: 10
Posted: 05 April 2017 at 5:03pm | IP Logged Quote jwaldha

kiiid wrote:
Only one suggestion - COM2 is software UART, so it is probably worth moving it over to another pair of pins to increase the overall functionality. I would suggest pins 6 and 7 (sacrificing PWM1C when COM2 is used)


Here is the solution.

2017-04-05_170013_MX270B.X.production.zip

I corrected the pin allocation for COM2. (COM2_TX: pin6, COM2_RX: pin7)

A little bonus:
You can freely select pins for COM2!
To do all that is required to create two integer variables: COM2_RX_PIN and COM2_TX_PIN.
If these variables are exist and contains valid (and free) pin numbers when execute the [OPEN "COM2:xxx"] command then this pins will be used.
If these variables are exist, but not contains valid (and free) pin numbers, then You get an error message.
If these variables are not exist, then the new defaults (6,7) will be used.
These pins will be exclusively allocated for COM2 until you close the COM2.
The allocated pins will be released again after You close the COM2.




__________________
---
JWaldha
Back to Top View jwaldha's Profile Search for other posts by jwaldha
 
chronic
Guru
Guru


Joined: 21 January 2012
Location: Australia
Online Status: Offline
Posts: 617
Posted: 06 April 2017 at 3:27am | IP Logged Quote chronic

Is the memory available decreased (ie because of the usb stack) ?
Back to Top View chronic's Profile Search for other posts by chronic
 
kiiid
Guru
Guru
Avatar

Joined: 11 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 667
Posted: 06 April 2017 at 6:15am | IP Logged Quote kiiid






__________________

http://ello.cc

--------------
Back to Top View kiiid's Profile Search for other posts by kiiid Visit kiiid's Homepage
 
sagt3k
Senior Member
Senior Member
Avatar

Joined: 01 February 2015
Location: Italy
Online Status: Offline
Posts: 273
Posted: 06 May 2017 at 8:20am | IP Logged Quote sagt3k

Hi jwaldha

Concerning 28pin version PIC32MX270F256B, Could you make a quick summary of pin used definitively?
Thanks
sagt3k
Back to Top View sagt3k's Profile Search for other posts by sagt3k Visit sagt3k's Homepage
 
jwaldha
Newbie
Newbie


Joined: 14 January 2016
Location: Hungary
Online Status: Offline
Posts: 10
Posted: 07 May 2017 at 10:08am | IP Logged Quote jwaldha

sagt3k wrote:
Hi jwaldha

Concerning 28pin version PIC32MX270F256B, Could you make a quick summary of pin used definitively?
Thanks
sagt3k


Hi, Antonio

The current default pinmap of MX270USB:

 1 - RESET
 2 - DIGITAL | ANALOG
 3 - SPI OUT | DIGITAL | ANALOG
 4 - PWM 1A | DIGITAL | ANALOG
 5 - PWM 1B | DIGITAL | ANALOG
 6 - PWM 1C | DIGITAL | ANALOG | COM2 Tx
 7 - DIGITAL | ANALOG | COM2 Rx
 8 - GROUND
 9 - 8MHz crystal
10 - 8MHz crystal
11 - CONSOLE Tx (DATA OUT) | COM4 Tx | DIGITAL
12 - CONSOLE Rx (DATA IN) | COM4 Rx | DIGITAL
13 - POWER (+2.3 to +3.6V)
14 - SPI IN | 5V | DIGITAL
15 - VBUS
16 - DIGITAL | 5V | COUNT | WAKEUP | IR
17 - DIGITAL | 5V | COUNT | I2C CLOCK
18 - DIGITAL | 5V | COUNT | I2C DATA
19 - GROUND
20 - 47uF TANT CAPACITOR (+)
21 - USB D+
22 - USB D-
23 - VUSB3V3
24 - ANALOG | DIGITAL | PWM 2B
25 - ANALOG | DIGITAL | SPI CLOCK
26 - ANALOG | DIGITAL | PWM 2A
27 - ANALOG GROUND
28 - ANALOG POWER (+2.3 to +3.6V)



Since the COM2 is implemented in software,
it is make to possible to use any free I/O pin
for COM2 Rx and Tx functionality.
This solution is use these technique:

To do all that is required to create two integer variables: 
COM2_RX_PIN and COM2_TX_PIN.
If these variables are exist and contains 
valid (and free) pin numbers when execute the [OPEN "COM2:xxx"] 
command then this pins will be used.
If these variables are exist, but not contains valid (and free) pin numbers, 
then You get an error message.
If these variables are not exist, then the new defaults (6,7) will be used.
These pins will be exclusively allocated for COM2 until 
you close the COM2.
The allocated pins will be released again after You close the COM2.



Some examples:
The serial data received on pin 24 and serial data transmitted on pin 25.


Pins 24, 25 are free:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
Open "COM2:4800" As #2
Close #2
>
> run
>


Pin 24 is not free, beacuse allocated for DigitalOutput:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
SetPin 24, dout
Open "COM2:4800" As #2
Close #2
> run
[6] Open "COM2:4800" As #2
Error: Pin 24 is in use
>



Same as above, but pin 24 is released with "SetPin 24, off" command:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
SetPin 24, dout
SetPin 24, off
Open "COM2:4800" As #2
Close #2
> run
>


Pin 24 is not free, beacuse allocated by "PWM 2, 1000, 10, 10" command:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
PWM 2, 1000, 10, 10
Open "COM2:4800" As #2
Close #2
> run
[6] Open "COM2:4800" As #2
Error: Pin 24 is in use
>


Same as above, but pin 24 is released with "PWM 2, stop" command:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
PWM 2, 1000, 10, 10
PWM 2, stop
Open "COM2:4800" As #2
Close #2
>
>
> run
>




Pin 24 is allocated for COM2 Rx.

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
Open "COM2:4800" As #2
SetPin 24, dout
Close #2
> run
[6] SetPin 24, dout
Error: Pin 24 is in use


Same as above, but pin 24 is released with "Close #2" command:

> list
Dim COM2_RX_PIN As integer
Dim COM2_TX_PIN As integer
COM2_RX_PIN = 24
COM2_TX_PIN = 25
Open "COM2:4800" As #2
Close #2
SetPin 24, dout
> run
>



I hope I could help you!

Regards,
Janos


__________________
---
JWaldha
Back to Top View jwaldha's Profile Search for other posts by jwaldha
 
sagt3k
Senior Member
Senior Member
Avatar

Joined: 01 February 2015
Location: Italy
Online Status: Offline
Posts: 273
Posted: 07 May 2017 at 3:47pm | IP Logged Quote sagt3k

Hi Janos
Thanks ... Excellent, exactly what I had asked and above all with the examples.
Some questions:
1) Given the features of moving the COM2 on others pins (COM2 sw), Can We also have the firmware for the 44pin?
2) Do you think keep this code aligned with Geoff's features in future ? Obviously with the approval of Geoff and guru of project.
Thanks
sagt3k
Back to Top View sagt3k's Profile Search for other posts by sagt3k Visit sagt3k's Homepage
 
jwaldha
Newbie
Newbie


Joined: 14 January 2016
Location: Hungary
Online Status: Offline
Posts: 10
Posted: 07 May 2017 at 5:34pm | IP Logged Quote jwaldha

sagt3k wrote:

1) Given the features of moving the COM2 on others pins (COM2 sw), Can We also have the firmware for the 44pin?
2) Do you think keep this code aligned with Geoff's features in future ? Obviously with the approval of Geoff and guru of project.


1) No, because unfortunately I do not have 44-pin MX270 version HW available to me.
2) Yes, I'm planning this.

Edited by jwaldha on 07 May 2017 at 5:35pm


__________________
---
JWaldha
Back to Top View jwaldha's Profile Search for other posts by jwaldha
 
kiiid
Guru
Guru
Avatar

Joined: 11 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 667
Posted: 18 May 2017 at 6:25pm | IP Logged Quote kiiid

Updated HEX file for the 44-pin MX270 chip to solve a critical bug in the SPI clock when USB is attached.

2017-05-18_182444_Micromite-MX270D.X.production.hex.zip




__________________

http://ello.cc

--------------
Back to Top View kiiid's Profile Search for other posts by kiiid Visit kiiid's Homepage
 
drkl
Senior Member
Senior Member
Avatar

Joined: 18 October 2015
Location: Hungary
Online Status: Offline
Posts: 102
Posted: 20 June 2017 at 9:09am | IP Logged Quote drkl

Hi,
The MM28STICK is ready!



Using direct USB communication, the PIC32MX270F256B microcontroller can also be used for MMBasic running. Due to the reduced number of usable pins, it is worth using MikroBUS connector assignment to create a directly plug-in USB board that I named MMSTICK28. Two USB ports are available, one standard and one microUSB connector.

The circuit diagram:



The terminals for the RX and TX terminals of the microBUS connector or the COTX (11) and CORX (12) terminals of the original console or the COM2 port TX (6) and RX (7) can be connected using the JP2 jumper. JP1 connector for updating the microprocessor program.

Here is the production documentation(EAGLE)
2017-06-20_084816_mm28stick.zip

drkl
Back to Top View drkl's Profile Search for other posts by drkl Visit drkl's Homepage
 
kiiid
Guru
Guru
Avatar

Joined: 11 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 667
Posted: 20 June 2017 at 9:49am | IP Logged Quote kiiid

Further to the topic: MX270D MMBasic v5.4

2017-06-20_094554_Micromite-MX270D.X.production.hex.zip


__________________

http://ello.cc

--------------
Back to Top View kiiid's Profile Search for other posts by kiiid Visit kiiid's Homepage
 


<< Prev Page of 3 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1406 seconds.
Privacy Policy     Process times : 0, 0.02, 0, 0.12