Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Embedded systems pic 16f877a serial transmission help

Status
Not open for further replies.

Fatherc0stas

Newbie level 6
Joined
Nov 26, 2012
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,369
Hello there,

I was wandering wether anyone can help me on a way to transmit a character message that is inputted from the LCD, in serial form (1 bit at a time), on an LED.

The texting programming has been finished but the only thing remaining is to find a way to make an LED flash according to the saved message.

Thanks in advance
 

Explain clearly? You want to transmit data using uart? you want to send character like 'A' which is displayed on lcd to a led?
 

Hello and thanks for the quick reply,

The program uses arrays to store all the characters of the alphabet plus space and delete features from RD0 to RD5 switches and the word or words written on the LCD are store in a separate array. Those characters are then transmitted on to the LED which lights according to the characters. Say i only type in "a" e led has to flash in accordance to the corresponding ASCII code binary buts (0001100) and that has to be done for all the sentence written.

I do not have experience in serial data transmission so i do not know any way of doing it currently

Thanks in advance
 

explain this Say i only type in "a" e led has to flash in accordance to the corresponding ASCII code binary buts (0001100)
what is e led? how many leds do you have?
 

I have only one LED (on RD7) that is going to light up or down according to the sentence. say for example i have a character in binary bits is 01011 and i use a 1 sec delay the led will light up 1 sec after i press the send button, then of for 1 more sec and then on for two more seconds.

Hope this helps

- - - Updated - - -

I have studied the datasheet of this PIC and through reading it it seems like something like the USART has to be used in asunchronous transmitter mode. Does this look correct and would do the job needed if the transmitted message is sent to an LED?
 

So you want to light the led serially according to the ascii character you give. For eg: if the char is 'A' i.e., ascii 1000001 then you light the led serially. But do you read the ascii value from left or right while lighting the led?
 

Probably yes from left to right, its start bit - character code (1000001) - stop bit then next letter until my message finished, and this is outputted on the LED
 

so if it is 11111111 then you will have 8 delays of 500 ms between each blink?

you have to store the ascii in an array, like

ascii[0] = 1
ascii[1] = 0
ascii[2] = 1
ascii[3] = 1
ascii[4] = 0
ascii[5] = 1
ascii[6] = 0
ascii[7] = 1

then loop 0 to 7 times taking each value at a time, assigning the value to lcd, and then giving a delay of 500ms or any desired delay.
 
Last edited:

delay can be changed but in case its 111111111 the LED will be always on until the character ends
 

that what my idea the first time, but the thing i dont really get is that say for example:

I type the word "hello" in the LCD

So then "hello" has to be transmitted onto one LED, one letter at at time with start bit and stop bit

So then i have,

h = [1101000]
e = [1100101]
l = [1100100]
l = [1100100]
o = [1101011]

so after this, my transmission sequence along with start bits and end bits is going to be

hello = 0,1101000,0-0,1100101,0-0,1100100,0-0,1100100,0-0,1101011,0

where every '-' is a change of character and 0's before and after commas are the start and end bits

I really dont get how to transmit this
 

Ok.. will go back to the drawing board tomorrow and try this out, hope it helps

Thanks a lot for your time
 

I think so yes as i read the pic datasheet it seems an asynchronous back to back serial transmission can be done using the USART module but it does not clearly say what has to be enabled in the program so you can access the register of the USART module

The idea is : TXREG is loaded with data (words etc) and outputted somewhere, in my case the LED, and because it is transmitted in clock shifts (baud rate) it should make the LED flash on and off
 

did u understand anything or not..........

did u got how to transmit a single character or not......
 

Not yet as i have uni all day today and cant give time on this... But no... all i understood is that it may be required to use the USARD module (which i do not know how to use) in asynchronous back to back serial transmission to accompish this task
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top