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.

goto $-1.............clrf LoX............ ?

Status
Not open for further replies.
I've seen your boards nigel, and they're wicked. In starting out with PIC programming, prefer to buy a board, so that, when it all goes wrong, it'll be the code, not my construction of a board. Will go for quaser electronics I think.

Will drop a circuit diagram later on.

Happy new year.
 
I have now modified the actual circuits, to achieve, a transmitter, and a reciever circuit. These modified from Nigels tutorial. Can these be checked for errors? They are attached in a one page word doc.

My worries so far are;

1.) On the reciever circuit, I have pin "RA2" recieving the data from the IR reciever. This is becuase the code is;

IR_PORT equ PORTA
IR_TRIS equ TRISA
IR_in equ 0x02

Have I made a mistake?

2.) On the reciever circuit, all the LED's are fed from portb pins, this is becuase the code is:
OUT_PORT equ PORTB
LED0 equ 0x00
LED1 equ 0x01
etc.....

Have i made a mistake?

3.) On the transmitter circuit, there are 2 IR LEDS. Why is this?? Is this to double up on the IR transmission, to ensure it gets sent??

4.) On the transmitter circuit, pin Rb1 feeds the IR LED's, this is becuase the code is:

IR_PORT equ PORTB
IR_TRIS equ TRISB
IR_OUT equ 0x01

is this correct?

5.) Transmitter circuit. The switches are all connected to porta......I can't find the section which specifies this in nigels code?? bit worried about this one.

6.) For the IR reciever, TFMS6360, I can't find this in RS components, can an alternative part/supplier be recommended. (prefer using RS)

7.) For the IR LED's, have chosen a 5mm, 880 peak wave length IR LED. don't know much about these, is there anything specific to be aware of?
 

Attachments

  • circuit.doc
    51 KB · Views: 252
timothyjackson said:
I have now modified the actual circuits, to achieve, a transmitter, and a reciever circuit. These modified from Nigels tutorial. Can these be checked for errors? They are attached in a one page word doc.

My worries so far are;

1.) On the reciever circuit, I have pin "RA2" recieving the data from the IR reciever. This is becuase the code is;

IR_PORT equ PORTA
IR_TRIS equ TRISA
IR_in equ 0x02

Have I made a mistake?

No, that's correct.

2.) On the reciever circuit, all the LED's are fed from portb pins, this is becuase the code is:
OUT_PORT equ PORTB
LED0 equ 0x00
LED1 equ 0x01
etc.....

Have i made a mistake?

Aggain, that's correct.

3.) On the transmitter circuit, there are 2 IR LEDS. Why is this?? Is this to double up on the IR transmission, to ensure it gets sent??

To provide double the IR energy, at no extra cost - as the IR LED's are in series less gets wasted in the series resistor.

4.) On the transmitter circuit, pin Rb1 feeds the IR LED's, this is becuase the code is:

IR_PORT equ PORTB
IR_TRIS equ TRISB
IR_OUT equ 0x01

is this correct?

Yes.

5.) Transmitter circuit. The switches are all connected to porta......I can't find the section which specifies this in nigels code?? bit worried about this one.

I haven't set an equate name for them, they are refered to as PortA in the code, you could easily equate a name to it - just like the others.

6.) For the IR reciever, TFMS6360, I can't find this in RS components, can an alternative part/supplier be recommended. (prefer using RS)

It's just a standard TV/VCR IR receiver IC, RS number 286-1419 looks the right sort of thing.

7.) For the IR LED's, have chosen a 5mm, 880 peak wave length IR LED. don't know much about these, is there anything specific to be aware of?

Mine came from RS, but I can't remember the part number, I use them for replacements in remote controls.
 
Nigel. You add so much. I would not have learnt so much at a fast rate without your contuing help. Thankyou.

Another finickity question.


"Quote:

5.) Transmitter circuit. The switches are all connected to porta......I can't find the section which specifies this in nigels code?? bit worried about this one.

I haven't set an equate name for them, they are refered to as PortA in the code, you could easily equate a name to it - just like the others. "


I guess what I mean is, I kind find the section of code which assigns the switches to PORTA, not neccessarily a porta "name". And, this means I'm worried this could present an error when programming/using it?.... I probably just need to take a closer look.

Its just that I like to understand rather than take for granted.

1.) I'm assuming this will work fine upto a 3 meter distance? I'll be selecting some wide angle IR LED transmitters (much like tv/radio remotes).

p.s. I'm not going to stop asking questions. :D :D :D :D
 
timothyjackson said:
I also take it you had a quick look at the circuits too...just to cast your eye over them??

First off, 'equates'

All an equate does is replace pieces of code at assembly time, so this example:

"IR_PORT equ PORTB"

Simply means "replace all occurances of 'IR_PORT' with 'PORTB' before assembly".

The advantage of it is you only have one place to make changes, so if you decided to use PORTC instead (on a 16F877) you could just change the equate to "IR_PORT equ PORTC" and all references to it will be changed.

Second - I've used mine at about 10m - the full length of the workshop where I work.

Third - yes, I looked at the circuits, they looked fine - except it's 'usual' to have the switches down to ground, and the resistor to +5V - as my tutorials do. It will work perfectly OK wired as it is, but not with my code (you would need to change some of the lines).
 
You are right. I was making the circuit diagram in word (not very user friendly for graphics), and that was a sacrifice. I will be changing the wiring to suit your original drawings.

Will be ordering components, development board, and PIC's over next couple of days, so I should be moving into "quite" mode for a while.

Till then.

:D
 
Is my thinking striaght?

About to chose PIC's to buy, I want 16f628's,

PDIP?? Is this dual in line package, the type I need to slot into a development board?

SOIC & SSOP, these are surface mount versions?
 
timothyjackson said:
Is my thinking striaght?

About to chose PIC's to buy, I want 16f628's,

PDIP?? Is this dual in line package, the type I need to slot into a development board?

SOIC & SSOP, these are surface mount versions?

Yes, you want PDIP (Plastic Dual Inline Package).
 
Why does the Microchip website have so many versions of the 16F628? i guess all of these would be sufficient for the IR project, and, the slight difference in the part numbers refers to different temperature ranges??

Or are these differences critical?

PIC16F628-04/P
PIC16F628-04E/P
PIC16F628-04I/P
PIC16F628-20/P
PIC16F628-20E/P
PIC16F628-20I/P

:?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top