Problemi con trasmissione Wireless 433Mhz

Sezione dedicata al sistema di sviluppo BASCOM-AVR per i micro AVR
At90s, Attiny, Atmega e Xmega

Problemi con trasmissione Wireless 433Mhz

Postby peter90 » 13 May 2012, 11:45

Ecco qui un semplice codice per trasmettere e ricevere dati a 433MHz attraverso la uart.
Purtroppo ho qualche problema.........
Con un logic probe riesco a vedere lo stream sul TX pin D.1 di Atmega8 a posso anche vedere in RX i dati ricevuti.
Non riesco a vedere nulla sul LCD del ricevitore, ma quando commento la linea INPUT A(1) lo schermo mostra il menu ma senza dati ricevuti. Cosa può essere ?

Transmitter:
Code: Select all

 $regfile = "m8def.dat"
 $crystal = 8000000
 $baud = 1200

 Dim I As Byte

 Do
 For I = 1 To 255
 Print &HAA ' Send Header (synchro)
 Print &B10001001 ' Send TX adress
 Print I ' Send Temperature
 Print &H80 ' Send 1/2°C
 Print &HF0 ' Send positiv or negative
 'Print &H ' Send checksum

 Wait 3
 Next I
 Loop
 End

Receiver:
Code: Select all

 $regfile = "m16def.dat"
 $crystal = 8000000
 $lib "glcdKS108.lbx"
 $include "my6_8.font"

 Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portd , Ce = 5 , Ce2 = 4 , Cd = 1 , Rd = 2 , Reset = 6 , Enable = 3

 Setfont My6_8

 Cls
 Lcdat 1 , 25 , "RECEIVER TEST"
 '
 Dim A(5) As Byte

 Do
 Lcdat 2 , 1 , "A: "
 Lcdat 3 , 1 , "B: "
 Lcdat 4 , 1 , "C: "
 Lcdat 5 , 1 , "D: "
 Lcdat 6 , 1 , "E: "

 Input A(1) , A(2) , A(3) , A(4) , A(5)

 Lcdat 2 , 20 , A(1)
 Lcdat 3 , 20 , A(2)
 Lcdat 4 , 20 , A(3)
 Lcdat 5 , 20 , A(4)
 Lcdat 6 , 20 , A(5)

 Waitms 1000
 Loop
 End
peter90
 
Posts: 44
Joined: 11 Apr 2012, 19:46

Re: Problemi con trasmissione Wireless 433Mhz

Postby deluca » 23 May 2012, 10:49

Instanto per prima cosa prova ad aggiungere al tuo sorgente la seguente riga:


$regfile = "m16def.dat"
$crystal = 8000000
$lib "glcdKS108.lbx"
$include "my6_8.font"

$baud=1200

se non definisci il baud rate come fai a fare comunicare i due moduli ?

Compila e programma
fammi sapere
Ciao
Il mio sito: http://www.delucagiovanni.com ......e la chat: chat/
User avatar
deluca
Site Admin
 
Posts: 1104
Joined: 19 Jun 2011, 10:44
Location: 95123 - Catania (Italy)

Re: Problemi con trasmissione Wireless 433Mhz

Postby peter90 » 28 May 2012, 17:46

intanto scusa se rispondo soltanto adesso, avevo dimenticato di avvertirti.

che stupido avevo dimenticato proprio la configurazione del baudrate.
adesso almeno quella parte funziona abb bene.


grazie
peter90
 
Posts: 44
Joined: 11 Apr 2012, 19:46


Return to BASCOM-AVR

Who is online

Users browsing this forum: No registered users and 8 guests

cron