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.

Some PIC basics for a newbie

Status
Not open for further replies.

matt1eg

New Member
Hi

I want to add a few features to a pic project I am trying to do. It is a remote sensor that will use the PIC16F887 connected to a ER900TRS transceiver via USART.

What I would like to do is have a led that flashes during transmission but I am not to sure how to implement this? Also I would like to add a push button to put the pic and transceiver into stanby mode, is this possible?

Any help would be great (circuit diagrams and code especially;))

Cheers

Oh am using MPLAB to program in assembly.
 
Hi

I want to add a few features to a pic project I am trying to do. It is a remote sensor that will use the PIC16F887 connected to a ER900TRS transceiver via USART.

What I would like to do is have a led that flashes during transmission but I am not to sure how to implement this? Also I would like to add a push button to put the pic and transceiver into stanby mode, is this possible?

Any help would be great (circuit diagrams and code especially;))

Cheers

Oh am using MPLAB to program in assembly.

If you can't figure out how to boink an LED, how will you possibly understand the USART interface?
 
Cheers for your help mike. Much appreciated:confused:

I have managed to work out the usart interface there is lot's on internet about that. But I can't find what I need on this. I am self teaching(researching) everything for this, I haven't done anything like this before and I was hoping for some help.

It may be a simple thing for you but for me with no background its not. Hopefully someone more understanding and helpful will be able to help me here instead.

Why do people bother replying with completely useless comments, surely you have better things to do?.... or perhaps you don't.
 
Mikebits is right. Don't be too sensitive on this point.
You might be saying I'm going to do brain surgery can someone tell me how to hold a scalpel?

I don't know anything at all about pics (there is an expert here) but I assume there is a pin on the device that is only high or low when it is transmitting data. Use this to control a transistor switch. The switch then will control an LED. Google has lots of info on LED circuits.
 
Hi

I want to add a few features to a pic project I am trying to do. It is a remote sensor that will use the PIC16F887 connected to a ER900TRS transceiver via USART.

What I would like to do is have a led that flashes during transmission but I am not to sure how to implement this? Also I would like to add a push button to put the pic and transceiver into stanby mode, is this possible?

Any help would be great (circuit diagrams and code especially;))

Cheers

Oh am using MPLAB to program in assembly.


hi,
Use a general purpose PNP transistor.
Connect the emitter to the +5V line.
Collector to 0V line via a 330R and a RED led.
Base to the PIC's /TX line via a 3K3

The led will blink On/off when RS232 data is being output.
 
Yeah fair enough.
What I was actually looking for is a way to get a led to flash if the transceiver is transmitting, didnt really make that clear. I know I could do it if I used an acknowledgement of receiving but I want to just have it flash while its transmitting whether it gets received or not. A simple flashing LED I can do.
 
Yeah fair enough.
What I was actually looking for is a way to get a led to flash if the transceiver is transmitting, didnt really make that clear. I know I could do it if I used an acknowledgement of receiving but I want to just have it flash while its transmitting whether it gets received or not. A simple flashing LED I can do.

I'm not exactly sure what you mean, but.

The circuit I described will flash while transmitting from the PIC.
Its OFF when NOT transmitting.

You could fit an identical circuit on the PIC's /RX pin.
Flashing when receiving data.

There is no programming required.
Is this what you mean.:)
 
Sorry I didnt actually get your post till after I wrote my reply.

Thats not what I was thinking but that me be the best I can get.

What I was thinking of was having an LED flash as the er900trs transmits not when the pic transmits. Is this possible? Or should I just assume that the transmitter will transmit the output from the PIC in which case your circuit will work fine.

Cheers
 
Sorry I didnt actually get your post till after I wrote my reply.

Thats not what I was thinking but that me be the best I can get.

What I was thinking of was having an LED flash as the er900trs transmits not when the pic transmits. Is this possible? Or should I just assume that the transmitter will transmit the output from the PIC in which case your circuit will work fine.

Cheers

hi,
Im assuming the er900trs is talking to the PIC's /RX pin.?

With this circuit on the PIC's /RX pin, when the PIC's /RX pin toggles down/up when there is incoming data the led will flash.
 
yeah and the tx pin(its actaully a transceiver). Im gona go with that it does what i need. Thanks for your help
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top