caramoan tour package

caramoan tour package

Author Topic: ascii serial ttl input to pic16f84a  (Read 498 times)

Offline adrianmlopez

  • CR2032 Battery
  • **
  • Posts: 32
  • Pogi/Ganda Points: 0
ascii serial ttl input to pic16f84a
« on: April 06, 2010, 02:50:30 PM »
patulong nama po sa thesi namin..my kit po kxe aq.e2 po ung ascii output....InRange,-0250.6,0010.0,-0150.2,+0.6228,220.39,0.5
806...gz2 ko po kxeng abangan lng ay ung power factor sa ex. po ay ung +0.6228..watever n mging value po nung power factor ay gz2 ko pong magkron ng command sa microcontroller..gaya po sa ex. na kapg +0.6228 ung output ay mag-out nman ung pic using 4 pins as pdeng 1001..parang gnun po..until mkbuo ng 16 n codition..plzz help po

Philippine Electronics Forum

ascii serial ttl input to pic16f84a
« on: April 06, 2010, 02:50:30 PM »

Offline ElektroniC8

  • Size AA Battery
  • ****
  • Posts: 111
  • Pogi/Ganda Points: 1
Re: ascii serial ttl input to pic16f84a
« Reply #1 on: April 06, 2010, 02:52:19 PM »
post your code first

Philippine Electronics Forum

Re: ascii serial ttl input to pic16f84a
« Reply #1 on: April 06, 2010, 02:52:19 PM »

Offline adrianmlopez

  • CR2032 Battery
  • **
  • Posts: 32
  • Pogi/Ganda Points: 0
Re: ascii serial ttl input to pic16f84a
« Reply #2 on: April 06, 2010, 08:48:30 PM »
e2 po ung code q...

include "modedefs.bas"
PF var byte
a var byte
b var byte
c var byte
d var byte
e var byte
f var byte
g var byte
h var byte
i var byte
j var byte
k var byte
l var byte
m var byte
n var byte
o var byte
p var byte
q var byte

TRISa = 255
TRISb = 0

main:

    serin2 porta.0,84,[wait("I"),skip32,#PF2],PH
   
    q = #PF2
     a = .99
     b = .97
     c = .93
     d = .90
     e = .88
     f = .85
     g = .80
     h = .77
     i = .74
     j = .70
     k = .69
     l = .67
     m = .63
     n = .59
     o = .57
     p = .53
     
    if q = a then portb = 0
    endif
    if q = b then portb = 1
    endif
    if q = c then portb = 2
    endif
    if q = d then portb = 3
    endif
    if q = e then portb = 4
    endif
    if q = f then portb = 5
    endif
    if q = g then portb = 6
    endif
    if q = h then portb = 7
    endif
    if q = i then portb = 8
    endif
    if q = j then portb = 9
    endif
    if q = k then portb = 10
    endif
    if q = l then portb = 11
    endif
    if q = m then portb = 12
    endif
    if q = n then portb = 13
    endif
    if q = o then portb = 14
    endif
    if q = p then portb = 15
    end if
     
goto main:
end

Philippine Electronics Forum

Re: ascii serial ttl input to pic16f84a
« Reply #2 on: April 06, 2010, 08:48:30 PM »

Offline marcelino

  • Moderator
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: ascii serial ttl input to pic16f84a
« Reply #3 on: April 06, 2010, 09:10:40 PM »
sis coolet. basic o...  ;D ;D ;D
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Philippine Electronics Forum

Re: ascii serial ttl input to pic16f84a
« Reply #3 on: April 06, 2010, 09:10:40 PM »

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
Re: ascii serial ttl input to pic16f84a
« Reply #4 on: April 07, 2010, 06:55:44 AM »
The conditionals must be a RANGE check.
Such as: if q <= a and q > b then portb = 0
Else, the IF condition will be only TRUE on that single value tested.
The Cebuano Geek

Philippine Electronics Forum

Re: ascii serial ttl input to pic16f84a
« Reply #4 on: April 07, 2010, 06:55:44 AM »

Offline Gem

  • CR2032 Battery
  • **
  • Posts: 14
  • Pogi/Ganda Points: 1
  • Gender: Female
Re: ascii serial ttl input to pic16f84a
« Reply #5 on: April 07, 2010, 10:09:45 AM »
pa-correct na lang po kung mali. float variables po ba dapat gamit dyan? kung yes, then di po kaya maliit ang 84A?

Offline adrianmlopez

  • CR2032 Battery
  • **
  • Posts: 32
  • Pogi/Ganda Points: 0
Re: ascii serial ttl input to pic16f84a
« Reply #6 on: April 07, 2010, 10:33:07 PM »
anu po ba right codes para sa project ko??wala p po kxe aqng background sa ascii serial ttl input eh....

Philippine Electronics Forum

Re: ascii serial ttl input to pic16f84a
« Reply #6 on: April 07, 2010, 10:33:07 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com