Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ADC

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-8051
View previous topic :: View next topic  
Author Message
danilomayojr

Bascom Member



Joined: 17 Feb 2010
Posts: 36
Location: San Fernando City

philippines.gif
PostPosted: Sat Dec 21, 2013 11:09 am    Post subject: ADC Reply with quote

Hi,

Is there any chance to use gather data from Analog input for bascom 8051?? i got pressure sensor that sends analog signal but dont how to integrate it to my mcu. i tried searching the help of bascom for reference (getad) but nothing happens... please help thank you in advance.

p.s. working on pesticide sprayer for our garden

_________________
Danilo Mayo Jr.
Back to top
View user's profile Visit poster's website Yahoo Messenger
Deanus

Bascom Member



Joined: 26 May 2006
Posts: 188
Location: Adelaide

australia.gif
PostPosted: Sun Dec 22, 2013 12:07 am    Post subject: Reply with quote

Hi Danilo,
Try searching for Getadc.
The search without the "C" doesn't find anything.

Regards

Dean
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5098
Location: Holland

blank.gif
PostPosted: Sun Dec 22, 2013 10:18 am    Post subject: Reply with quote

you might want to check the bascom help for : GETAD2051 and getad as mentioned.
you can also use an a/d converter with i2c or SPI control.

_________________
Mark
Back to top
View user's profile Visit poster's website
danilomayojr

Bascom Member



Joined: 17 Feb 2010
Posts: 36
Location: San Fernando City

philippines.gif
PostPosted: Sun Dec 22, 2013 12:33 pm    Post subject: Reply with quote

am i using a wrong MCU? im using AT89S52.... is this ok? Thank you
_________________
Danilo Mayo Jr.
Back to top
View user's profile Visit poster's website Yahoo Messenger
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5098
Location: Holland

blank.gif
PostPosted: Sun Dec 22, 2013 1:36 pm    Post subject: Reply with quote

when your micro has the comparator, you could use the getad2051 but otherwise you need an external a/d converter.
_________________
Mark
Back to top
View user's profile Visit poster's website
danilomayojr

Bascom Member



Joined: 17 Feb 2010
Posts: 36
Location: San Fernando City

philippines.gif
PostPosted: Mon Dec 23, 2013 1:43 am    Post subject: Reply with quote

mcu = STC12C5A32S2.. its the same pin to pin config of AT89S52 said by the shop.... i attached the pin config of the MCU. thanks
_________________
Danilo Mayo Jr.
Back to top
View user's profile Visit poster's website Yahoo Messenger
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5098
Location: Holland

blank.gif
PostPosted: Mon Dec 23, 2013 10:20 pm    Post subject: Reply with quote

this processor has NO comparator. It also has no A/D converter so you need a different processor or an external A/D
_________________
Mark
Back to top
View user's profile Visit poster's website
danilomayojr

Bascom Member



Joined: 17 Feb 2010
Posts: 36
Location: San Fernando City

philippines.gif
PostPosted: Tue Dec 24, 2013 10:29 am    Post subject: Reply with quote

According to the datasheet there is comparator sir.. the ADC is in

p1.0 = Reference
P1.1 = Vin..

I just dont know how to configure getad2051() i already tried it but nothing happen

_________________
Danilo Mayo Jr.
Back to top
View user's profile Visit poster's website Yahoo Messenger
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5098
Location: Holland

blank.gif
PostPosted: Tue Dec 24, 2013 10:40 am    Post subject: Reply with quote

i could not find a datasheet of your chip but i looked at the AT89S52 which did not had this comparator.
when it has one : just look in the help for the circuit. getad2051

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-8051 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum