Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best way to do IR communication...

Status
Not open for further replies.
RF would be nice, but i don't know ANYTHING about RF... :(
 
It's not that bad Marks, it's just hard to get good easy to understand information on. If you want real 'black voodoo' try learning about how antenna's work =)
 
Marks256 said:
RF would be nice, but i don't know ANYTHING about RF... :(


That’s no problems as the above unit would be a great intro too it.

You can simply use the PIC's UART to send data out, and in Swordfish it would be something like this;

Code:
Device = 18F452
Clock = 20

// import usart module...
Include "usart.bas"

Dim Var1 As Byte

SetBaudrate(br2400)
Var1 = 150
USART.Write(Var1)

The RF module will encode it and send it on the fly (handy feature), and then hook up the RX data line of your RF module to the UART rx pin on your PIC, and use some code like this to receive the data

Code:
Device = 18F452
Clock = 20

// import usart module...
Include "usart.bas"

Dim Var1 As Byte

SetBaudrate(br2400)
USART.Read(Var1)

//Do something with Var1

There are many other UART features with Swordfish, but keep it simple to start out :eek:

A quick read of the help file (best resource for any compiler) will show you what’s available
 
Sceadwian said:
If you want real 'black voodoo' try learning about how antenna's work

Tell me about it. I attempted it a while back... wow... :s




I am thinking about just getting a pair of RS232 trancievers... They are ~$50(U.S.C.)
 
Status
Not open for further replies.

Latest threads

Back
Top