Jump to content

Simple Watt Meter Program

- - - - -

  • Please log in to reply
6 replies to this topic

#1
WattOut

WattOut

    Newbie

  • Members
  • Pip
  • 4 posts
We need a simple watt meter sample program. We figured we could ask some of the best.

Something that would work on the PIC16F84A.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
I am unsure if anybody on hand here works with assembly, especially with PICs in that regard. You may have better luck with a discussion group or resource more oriented towards the microcontroller.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
I can be of limited help. What exactly are you trying to do? Please be as specific as possible.
sudo rm -rf /

#4
WattOut

WattOut

    Newbie

  • Members
  • Pip
  • 4 posts
We need a program written in assembly that can be flashed onto the PIC16F84A chip.

The program must:

-get its input from a wall socket
-calculate wattage from the two readings of current and voltage
-display the readout in kilowatts/hour on an LCD screen.

Thank you.

#5
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
That's not being specific. You've said nothing about what kind of LCD screen, what its protocol is, nor what kind of sensor you're using or what data to expect. This really sounds like a homework assignment or school project to me, so I'd suggest starting here. We'll gladly help with homework, but we won't do it for you.
sudo rm -rf /

#6
WattOut

WattOut

    Newbie

  • Members
  • Pip
  • 4 posts
I apologize. It isn't a homework assignment, and the LCD display is here (Parallax 2x16 Serial LCD (Backlit)). The parts that it uses are arbitrary. We just need the concept.

Thank you.

#7
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Okay, so wattage is P = IV, so you need to be able to multiply the two numbers together. Unfortunately it looks like the PIC16F84A doesn't have a multiplication routine, so you're going to have to write one yourself. After that, you're going to have to take your number and display it on the LCD. It's probably best if you store the actual digits in bitmap form when compiling so you don't have to redraw them every time.
sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users