Discussion in "PIC Microcontroller Discussion" started by    Dasco    Nov 11, 2008.
Tue Nov 11 2008, 08:29 pm
#1
I am trying to read 8 signals suing a msc1200
i would like to write a vb program to get the signals via serial com periodically ( every 10 seconds)
any help?
Thu Nov 13 2008, 01:07 pm
#2
Move step by step..

Part1: As MSC1200 is 8051 compatible, so first try with serial communication part. Write a simple program to see if its functioning right or not. you can take reference from Serial Communication tutorial in tutorial section of website.

Part2: Regarding Analog inputs, you have 8 analog channels onchip so reading them wont be a problem (considering your hardware is ready).

Part3: Make use of onchip timers to generate a delay of 10 seconds.

at every 10 sec read ADC data and then send it to serial window.
VB part can be discussed once the hardware is ready. you can check the o/p on hyperterminal.
Thu Nov 13 2008, 02:55 pm
#3
thanks for the reply
I receive the data via serial port using ti server1200 program, that is a hex file i load on the board and it starts sending me data through serial port of the board.
the results are in xxxxx( hex) format.
but it is only for one channel, so i need to run this for 8 channels.
what i need now is a vb program to convert the data into dec. values and run the process every ten seconds.
any template or a sample code to get me any jump start??
Thu Nov 13 2008, 03:02 pm
#4
can you attach the C file here (zip it) i will take a look at it.
Thu Nov 13 2008, 03:15 pm
#5
sure
this is the server program that comes with the mcu
and to open it you need ride tool ( http://www.raisonance.com/)
but nevertheless the source codes are all included

Attachment
Thu Nov 13 2008, 03:59 pm
#6
in file server.c ADCMUX register is configure to read AN0 for +ve i/p and AN1 for -ve input.

you can put this program in loop to read all the channels one by one.. read page 47 of datasheet carefully.
Thu Nov 13 2008, 04:41 pm
#7
how?
Fri Nov 14 2008, 07:08 pm
#8
did u read datasheet? i gave u the page number too..
Fri Nov 14 2008, 07:48 pm
#9
yes but i don't know how to put the program in loop
Sat Nov 15 2008, 09:15 pm
#10
yes thats right, coz program flow is not understandable at all.. I will try to take a close look at it again. Was lil busy with work.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am