Wireless problem


Results 1 to 24 of 24

Threaded View

  1. #1
    Join Date
    Dec 2007
    Posts
    7

    Default Wireless problem

    Hello everybody.

    I've been looking a lot your forum which gave me a lot of help without the need of ask questions... all my problems where solved using 'Search'...

    Now I think I need some guru help to solve my little problem.

    I am trying to build a remote trasmitter wich will send SHT11 sensor data to my wireless station.

    The modules I am using are this(TX):http://elmarpeters123.googlepages.com/TM1000-1.pdf
    and this for RX (RM1SGS):http://e-madeincn.com/Product/Product-RXModule.htm

    I've found them on ebay. They are very cheap. I paid 12€ for 3 pairs of them, shipping included!

    I am writing some simple code to test them. The transmitter is a 12F683. Power pin is used to power up the transmitter via a transistor, will send data and then will be powered off for a minute to save battery.Here is the TX section:
    Code:
    
    INCLUDE "modedefs.bas"
    
    ANSEL=0
    CMCON0=%00000111
    define osc 4
    txpin   var gpio.4
    led     var gpio.5
    power   var gpio.2
    i       var byte
    
    low power
    
    loop:
        for i=0 to 9
        high power
        serout txpin,n2400,[$55,$55,$66,#i]
        high led
        pause 30
        low led
        pause 1000
        low power
        pause 1000
        next i
    goto loop 
    Then there is the RX section, the pic used is a 16F876:

    Code:
    
    INCLUDE "modedefs.bas"
    
    define osc 20
    Define 	LCD_LINES	4			' Settings for a 4x20 LCD
    Define	LCD_DREG	PORTB		'   4bit mode
    Define	LCD_DBIT	4			'
    Define	LCD_RSREG	PORTB		
    Define	LCD_RSBIT	3		 	
    Define	LCD_EREG	PORTB'      
    Define	LCD_EBIT	2
    
    'LCD Lines constants
    row4        con	$d4
    row3	    con	$94
    row2	    con	$c0
    row1	    con $80
    rxpin   var portb.0
    rx_data var byte
    
    TRISC=255
    intcon=0
    
    pause 500
    lcdout $fe,1
    lcdout $fe, row1, "** RX TEST **"
    pause 300
    
    loop:
          serin rxpin,n2400,1000,loop,[$66],#rx_data
          lcdout $fe, row3,dec1 rx_data
    goto loop
    
    The TX/RX modules work fine, If I monitor the rx pin of the receiver I get exactly what I send, with no garbage at all.

    Still on the rxpin set on the pic I get the same clean data.

    Can somebody explain me why the PIC does not always print the correct data?
    The amount of correct numbers recieved is about 60%.
    I've tried with and without preambles, serin, serin2,hserin, but I always get the same results.
    I repeat, connecting the rxpin to an rs232 everyhing's perfect. It seems the pic is not fast enough the get data! It has a 20Mhz clock with proper capacitors.
    One more thing: The pic has all the sensors(18b20, SHT11, pressure, RTC) soldered around.
    I'am trying to expand the initial project, adding a receiver.
    Anyway, the code uses just the rxpin to catch data.
    Thank you for your attention
    Francesco
    Last edited by supersonic; - 17th December 2007 at 14:51.

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 19:52
  2. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. CM02 and RF04 wireless modules problem
    By vladimir059@hot in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th December 2006, 10:32
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts