Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:43 25 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 : Desperate need of help dm3.1 and dm mini

     Page 1 of 2    
Author Message
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 11:15am 29 Mar 2012
Copy link to clipboard 
Print this post

I am trying to send serial data to a duinomite and then save it to the sd card. I have used the following program using a Duinmite mini:

[code]
OPEN “COM1:4800” AS #5 ‘ open the first serial port with a speed of 4800 baud
PRINT #5, “Hello” ‘ send the string “Hello” out of the serial port
Data$ = INPUT$(20, #5) ‘ get up to 20 characters from the serial port
CLOSE #5 ‘ close the serial port
PRINT DATA¤


My though was to connect the duinoite to itself to test this. I see Olimex duinomite user manual the GPIO pins for 13,14. This means I ma connected to the following:

----------- -------------
x x x x x x x x x x x x x
x x x x x x x x O O x x x
---------------------------

It should print "hello" but does not work at all. In the MMBASIC manual from Geoff I see that COM1 are 15 and 16. It does not work on these pins either. I am wondering what I am doing wrong. To be honest nothing I have tried has worked. I am wondering if I got two bad boards?
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 11:36am 29 Mar 2012
Copy link to clipboard 
Print this post

Hello Someone

1. Does the board you are using support full duplex ?
2. You have "PRINT DATA" and yet you said "DATA$" above that
3. Do you have an Oscilloscope ?
4. Can you wire up a computer serial port as a sniffer across the TX ?
5. If the system can only BIT BANG serial, can it do two things at once ?

What board have you got ? I wil put my ocsilloscope on the pins and see if there is anything going out.

I have a DuinoMite and a DuinoMite Mini.

What is severley lacking is a table for what com ports connect to what pins

Andrew Rich VK4TECEdited by vk4tec 2012-03-30
Andrew Rich VK4TEC
www.tech-software.net
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 11:40am 29 Mar 2012
Copy link to clipboard 
Print this post

  vk4tec said   Hello Someone

1. Does the board you are using support full duplex ?
2. You have "PRINT DATA" and yet you said "DATA$" above that
3. Do you have an Oscilloscope ?
4. Can you wire up a computer serial port as a sniffer across the TX ?
5. If the system can only BIT BANG serial, can it do two things at once ?

What board have you got ? I wil put my ocsilloscope on the pins and see if there is anything going out.

I have a DuinoMite and a DuinoMite Mini.

Andrew Rich VK4TEC


Nope that is just a typo here....

I have print data$. I am using a duinomite mini with mmbasic 3.1 (recently released)

Anyways I would really really appreaciate that!

rob
 
crackerjack

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 11:42am 29 Mar 2012
Copy link to clipboard 
Print this post

Hi Robarino, I also had some troubles with Serial IO at first, but here are some thoughts that hopefully can get you in the right direction:

* Do you have an oscilloscope to check that there is actually some activity on what you believe are the TX pins?
* If not, maybe you can use a multimeter if you send a constant stream of bits - a Print #5 "x" in a loop maybe...
* Try using the LOC(), LOF() and EOF() functions (check the MM manual, Appendix A),
* The MM version 3.1 Manual states that COM2 (not COM1 as per your program in the post above) is on Pins 13/14 of the Duinomite.
* If you have a cheap TTL to USB board (on ebay about $2.50 - here is one seller's link , but search about - there are many). With this you can then send the Serial to a PC via TeraTerm and do some testing that way.

Good luck.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 11:48am 29 Mar 2012
Copy link to clipboard 
Print this post

Rob

I will send "Hello" on different com ports and report back soon

DunioMite Mini it will be

Andrew
Andrew Rich VK4TEC
www.tech-software.net
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 12:04pm 29 Mar 2012
Copy link to clipboard 
Print this post

Hej Crackerjack...

Tested it with a setpin 1,1 and reading all the ports with a straight print like you suggested. Pin 14 shows 1.07 volts solid so I know that it send from pin 14 for COM2.

Now if it would just read what I send...

rob

 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 12:14pm 29 Mar 2012
Copy link to clipboard 
Print this post

Andrew...if you can get it to read a serial let me know how you did it...
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 12:36pm 29 Mar 2012
Copy link to clipboard 
Print this post

Crackerjack...

I wonder if you could post some example code that worked for you.

rob
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 12:38pm 29 Mar 2012
Copy link to clipboard 
Print this post

Ok here are my findings:-

DuinoMite Mini

Maximite BASIC Version 2.7A
Copyright 2011 Geoff Graham

//

I think I need to update my firmware as well - will try

Using a scope and some code and differing between 1200 and 9600 baud

OPEN "COM1:4800" AS #5
Could not find it on any pins

OPEN "COM2:4800" AS #5 sends on DuinoMite Mini Pin(20) GPIO pin 22
Does this share with VGA ?

OPEN "COM3:4800" AS #5 send on DuinoMite Mini UEXT Pin 3.
This is PIC32 U2RX

OPEN "COM4:4800" AS #5 sends on DuinoMite Mini Pin(12) GPIO pin 6
This is PIC32 U5TX

Hope this helps

Andrew Rich VK4TEC
Edited by vk4tec 2012-03-30
Andrew Rich VK4TEC
www.tech-software.net
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 01:27pm 29 Mar 2012
Copy link to clipboard 
Print this post

After a FirmWare upgrade for the DuinoMite Mini

DMBasic Version 2.7B
Based On MMBasic By Geoff Graham

OPEN "COM1:4800" AS #5 - GPIO Pin 14 - nice square wave UART ?

OPEN "COM2:4800" AS #5 - GPIO Pin 22 - nice square wave UART ?

OPEN "COM3:4800" AS #5 - UEXT Pin 3 - bad square wave I/O pin ?

OPEN "COM4:4800" AS #5 - GPIO Pin 6 - bad square wave I/O pin ?





Andrew Rich VK4TEC
www.tech-software.net
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 02:14pm 29 Mar 2012
Copy link to clipboard 
Print this post

Weird. I used 3.1 and had com2 13 and 14.
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 03:30pm 29 Mar 2012
Copy link to clipboard 
Print this post

Anyways I cannot get it to work. I was thinking that I could connect an arduino to the duinomite and using a huge buffer save data from the arduino to the duinote. I cannot seem to get the program to read anything. When I run it it just prints empy characters on the screen. Black space if you will. I was hoping I could figure this out.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 09:55pm 29 Mar 2012
Copy link to clipboard 
Print this post

At the end of the day

+ You should understand what PIC32 chip you have
+ Look at it under a mganifying glass
+ Look up the data sheet and work out whet pins are UARTs
+ Work out what pins on your board connect to those UART PINS

You can do serial two ways in PIC

+ Bit Bang - make up the ones and zeros
+ USART - the little built in serial port in the PIC32

I have a PIC32MX695F512H-80I/P

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3801
Posted: 07:22am 30 Mar 2012
Copy link to clipboard 
Print this post

  robarino said   Weird. I used 3.1 and had com2 13 and 14.

Andrew got it working OK with 2.7B so your problem appears related to 3.1

Now, 3.1 is from GeoffG so read his documentation / ask him for support.

Or, try 2.7B.

John
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 11:24pm 30 Mar 2012
Copy link to clipboard 
Print this post

I have been some testing also on my collection
Results so far.
Duinomite Regular - Killed PIN 14 (yes pin14 no longer works at all)
duniomite mini - com2: works , com1: flaky
duinomite Mega - Com2: works , com1: flaky
Edited by djuqa 2012-04-01
VK4MU MicroController Units

 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3801
Posted: 07:44am 31 Mar 2012
Copy link to clipboard 
Print this post

What did you do to kill pin 14?

John
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 07:46am 31 Mar 2012
Copy link to clipboard 
Print this post

No idea, Was merrily going along throwing data In & Out Com1: Com2 between 2 DM's and Then it went to Heaven.

VK4MU MicroController Units

 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 12:10pm 01 Apr 2012
Copy link to clipboard 
Print this post

http://www.tech-software.net/GPS_SD_LCD.pdfEdited by vk4tec 2012-04-02
Andrew Rich VK4TEC
www.tech-software.net
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 12:51pm 01 Apr 2012
Copy link to clipboard 
Print this post


Andrew Rich VK4TEC
www.tech-software.net
 
robarino
Newbie

Joined: 15/03/2012
Location: Sweden
Posts: 24
Posted: 01:40pm 01 Apr 2012
Copy link to clipboard 
Print this post

Hej I fuigured it out and wrote a tutorial. It was so easy! I tend to overthink things.

Anyways here is a tutorial I wrote for the total NOOBS!!!

http://duiner.com/?p=86
 
     Page 1 of 2    
Print this page
© JAQ Software 2024