Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Receive Serial IR?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-01-2007, 09:46 AM
Junior Member
 
Join Date: Nov 2007
Posts: 10
Default Receive Serial IR?

Need help with serial IR communication.
Axim X51v WM5
I ran the comports app. Says IR is Com2.
I ran the example SerialTerminal.sbp.
Nothing.
I changed the serial.new1 command to
serial.new2(2,9600,"N",8,1) to try to force
the correct mode.
Still nothing.

The data source is a PIC processor with an IR led.
I can receive this data on a PalmIII with a program
written in interpredted Hotpaw Basic.
On the Axim, I can run PocketDAQ and receive the data.


What's the secret to setting up Basic4ppc to receive
serial Infrared data in SIR mode?
I'm also gonna want to transmit SIR data.

Thanks, mike
Reply With Quote
  #2 (permalink)  
Old 12-01-2007, 10:13 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

Have you tried to use port 3 instead of 2?
Serial IR port is usually port 3.
Reply With Quote
  #3 (permalink)  
Old 12-01-2007, 12:40 PM
Junior Member
 
Join Date: Nov 2007
Posts: 10
Default interesting

Seems odd that a program designed to enumerate the ports
would give the wrong answer?? Anyway, I tried port3. That's when the
interesting stuff happened.

Surely, the programmers are aware that on a PDA VGA screen
the error messages are in a modal dialog box that's
almost full screen in portrait mode.

In landscape mode,
the button to dismiss the error is off screen. Often, I have to reset the pda,
or at least kill the program
to get out of it. It's been really annoying to have to reset and try to
figure out where I was every time the
program encounters an error...which is often, given my (lack of) programming
experience. Hope that's on the bugfix list.

The error message happened when I tried to open a non-existent
port, port3. System locked up with no way to get out, so I had to reset it.
After the reset, I can receive the data on com port 2. Haven't evaluated
it thoroughly, but seems to be working.

I'd forgotten the first rule of windows programming, "when in doubt,
reboot everything."
Must have been some argument over who had control of the port.
Maybe there's a clue to a bugfix in there...or maybe just windows mobile...

One hurdle down, thanks, mike
Reply With Quote
  #4 (permalink)  
Old 12-01-2007, 06:00 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 238
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I've been trying to get my Micromaxx MDPPC150 (MIO168 Clone) to receive IR from a PIC for the best part of 2 years now, and still no success.

How are you transmitting the data from the controller, just plain 9600 serial ?
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #5 (permalink)  
Old 12-03-2007, 12:37 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default

spamme0, I also have an Axim X51v but do not experience the same problem as you regarding error messages.
In both portrait and landscape modes the error messages appear in the center of the screen and occupy a reasonable area. the close button is easily accessable.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #6 (permalink)  
Old 12-08-2007, 05:25 PM
Junior Member
 
Join Date: Nov 2007
Posts: 10
Default error msg

Quote:
Originally Posted by RandomCoder View Post
spamme0, I also have an Axim X51v but do not experience the same problem as you regarding error messages.
In both portrait and landscape modes the error messages appear in the center of the screen and occupy a reasonable area. the close button is easily accessable.

Regards,
RandomCoder

So, you're saying that you're running V5.80
You ran the SerialTerminal.sbp demo program in landscape mode.
You gave it an invalid serial port.
And you did NOT an error message that was too big for the page?

Screen capture attached.
Attached Images
File Type: jpg ppcermsg.jpg (12.5 KB, 24 views)
Reply With Quote
  #7 (permalink)  
Old 12-08-2007, 05:46 PM
Junior Member
 
Join Date: Nov 2007
Posts: 10
Default

Quote:
Originally Posted by taximania View Post
I've been trying to get my Micromaxx MDPPC150 (MIO168 Clone) to receive IR from a PIC for the best part of 2 years now, and still no success.

How are you transmitting the data from the controller, just plain 9600 serial ?
The format used for serialIR is "almost" RS-232 in NRZ format.
The setup screens in SIR programs suggest that there's a stop pulse.
I don't see one on the scope...which is a problem for simple receivers.
It's close enough that if you send a 15uS pulse for a zero and no pulse
for a 1, and stick with 7-bit ascii in an 8-bit word, you can make it work
'cause the 8th bit is always zero and creates a pulse you can use for
the end of frame. Then a simple software pulse stretcher should
turn the NRZ into something close enough to RZ to make the UART work
in receive mode. I've not yet needed to receive on the PIC, so haven't actually implemented that part.

To send from the PIC,
I hacked PBPPIC14.LIB in PicBasic to make the Debug command send in SIR.
PocketDAQ is a good starter program to look at what's coming in over the SIR.
The serialterminal demo program discussed in this thread also works
once you figure out which port to use.

Best way to get started is to use two windows PDA's running PocketDAQ.
Once you get them talking, you can watch what's going on
on an oscilloscope and bootstrap up from there. Another alternative
is to use an old/cheap Palm Pilot and HotPaw Basic to receive the SIR.
Palm Pilots are basically free.
mike
Reply With Quote
  #8 (permalink)  
Old 12-08-2007, 06:11 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

This thread will solve the "Optional resource assembly..." and make it show a more descriptive error message.
Avoid the "optional resource assembly cannot be found"
Reply With Quote
  #9 (permalink)  
Old 12-08-2007, 07:37 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 238
Awards Showcase
Beta Tester 
Total Awards: 1
Default Bingo, bargain, success finally, well sort of :-)

Quote:
Originally Posted by taximania View Post
I've been trying to get my Micromaxx MDPPC150 (MIO168 Clone) to receive IR from a PIC for the best part of 2 years now, and still no success.
Quote:
PocketDAQ is a good starter program to look at what's coming in over the SIR.
@Spamme0:
PocketDAQ, it's a new one to me. Many thanks for pointing me to it.
It actually see's the data I'm transmitting from the Microchip PIC16F877A I'm using.

@Erel:
My PPC can see IR data from a microchip PIC. PocketDAQ proves this.
Any ideas on how the programmers of PocketDAQ use the serial port differently to B4PPC ??

2 years, looks like were getting somewhere :-)
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net

Last edited by taximania : 12-08-2007 at 07:55 PM.
Reply With Quote
  #10 (permalink)  
Old 12-08-2007, 08:03 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

What happens when you try to receive the data?
Are you using Serial IR ? You can't read Native (Raw) IR data.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial data receive problem Aaron Padilla Bug Reports 3 08-01-2008 02:23 PM
Send/receive email on device aerohost Questions & Help Needed 1 06-30-2008 06:46 AM
FTP Receive Help jeterry Questions & Help Needed 6 04-04-2008 12:51 PM
serial Cor Questions & Help Needed 1 01-18-2008 01:49 PM
serial i/o Softselect Questions & Help Needed 1 07-24-2007 02:48 PM


All times are GMT. The time now is 09:58 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0