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: SwedenPosts: 24 |
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: AustraliaPosts: 239 |
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 VK4TEC Andrew Rich VK4TEC www.tech-software.net |
||||
robarino Newbie Joined: 15/03/2012 Location: SwedenPosts: 24 |
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: AustraliaPosts: 164 |
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: AustraliaPosts: 239 |
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: SwedenPosts: 24 |
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: SwedenPosts: 24 |
Andrew...if you can get it to read a serial let me know how you did it... |
||||
robarino Newbie Joined: 15/03/2012 Location: SwedenPosts: 24 |
Crackerjack... I wonder if you could post some example code that worked for you. rob |
||||
vk4tec Senior Member Joined: 24/03/2012 Location: AustraliaPosts: 239 |
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 Andrew Rich VK4TEC www.tech-software.net |
||||
vk4tec Senior Member Joined: 24/03/2012 Location: AustraliaPosts: 239 |
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: SwedenPosts: 24 |
Weird. I used 3.1 and had com2 13 and 14. |
||||
robarino Newbie Joined: 15/03/2012 Location: SwedenPosts: 24 |
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: AustraliaPosts: 239 |
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 KingdomPosts: 3801 |
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: AustraliaPosts: 447 |
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 VK4MU MicroController Units |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3801 |
What did you do to kill pin 14? John |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
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: AustraliaPosts: 239 |
http://www.tech-software.net/GPS_SD_LCD.pdf Andrew Rich VK4TEC www.tech-software.net |
||||
vk4tec Senior Member Joined: 24/03/2012 Location: AustraliaPosts: 239 |
Andrew Rich VK4TEC www.tech-software.net |
||||
robarino Newbie Joined: 15/03/2012 Location: SwedenPosts: 24 |
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 |