Author Topic: pic16f877a  (Read 1655 times)

0 Members and 1 Guest are viewing this topic.

Offline srdp45Topic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
pic16f877a
« on: March 29, 2011, 05:45:34 AM »
Hi, im new to pic and learning now. i want to write pic16f877a program, which takes input from c source code. the output from c code i have saved it in a file(output.txt). that file will be having two values, r and theta values.
my issue is i want to write pic16f877a program which takes this two values(r,theta) that is, it should receive and transfer values to and from microcontroller using rs232, respectively. please help me.

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: pic16f877a
« Reply #1 on: March 29, 2011, 06:40:13 AM »
Where is "output.txt"?  I'm somewhat confused about your question, so I'll draw a crude block diagram.

Code: [Select]
|output.txt| <-- location?

|Input| -> |PIC16F877A| <-> |unknown microcontroller|
                      RS-232

Does that look right?  If so, we will need to know what the 'microcontroller' mentioned in your question is.

You might also want to note that PIC16F877As (or most microcontrollers, for that matter), does not have a filesystem, or any concept of 'files': you program binary data into it.

When we've got some more info, we can help you out a little more.  Something that would be really beneficial would be the goal of this particular setup... namely, what you want it to do.


P.S.: Don't cross-post.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: pic16f877a
« Reply #2 on: March 29, 2011, 07:53:00 AM »
Quote
P.S.: Don't cross-post.
My answer is here:
http://www.societyofrobots.com/robotforum/index.php?topic=13549.0

Offline srdp45Topic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: pic16f877a
« Reply #3 on: March 31, 2011, 12:11:31 PM »
"output.txt" file is located in PC. my output.txt file will have two integer values.

In my project im using pic16f877a microcontroller with RS232 connector.
my issue is, i have calculated two values(r and theta) using c code and saved it in a file(say output.txt)[in PC].
now i want to send this values to pic-microcontroller. to send this values, i need a pic code. please help

|output.txt| <-- located in PC

|input [read r and theta values from PC(saved in output.txt file)]| -->|PIC16F877A| <--RS232 connector--> |microcontorller|

IM new to pic, learning now. I have read pic datasheet and instruction set. even though i dont have idea how pic code looks like. pls help.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: pic16f877a
« Reply #4 on: March 31, 2011, 01:13:09 PM »
Did you read my answer where you also posted the question?
Everything you need is there!

We won't write code for you but will help you get code you wrote working. What you need is not difficult to do on a PIC but you must do the necessary reading to learn how to do this.

On the PC side you will need to write a Windows program to send the txt file to the PIC or send the txt file using a terminal program like HyperTerm, RealTerm or TeraTerm.

 


data_list