Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
abbas1707 said:which prog. language is the best and mostly prferred for microcontrollers....
assembly or c???????
i think c is the best choice.because it is easy to understand and programs are smaller in size as compared to assembly.
wat do u say????
can u explain y???donniedj said:Wrong on all counts.
Dim Var1 As Float
Dim Var2 As Float
Dim Var3 As Float
Var1 = 754652.123
Var2 = 87745.587
Var3 = Var1 / Var2
[B]ASM[/B]
' ASM Code
[B]End ASM[/B]
gramo said:Hell no... Compilers are that efficient these days, it comes down to the user's programming techniques.
Hey, wait a minute. I write structured and modular code in Assembler, C, and BASIC. Who says structure and modularity are unique to C and BASIC?gramo said:You can take on a structured modular approach with higher languages, and you have exactly the same degree of flexibility.
// uses LCD and ADC libraries...
[B]Include [/B]"LCD.bas"
[B]Include [/B]"ADC.bas"
[B]Include [/B]"convert.bas"
// read the AD port and scale for 0 - 5 volts...
[B]Function [/B]ADInAsVolt() As Word
[B]Result [/B]= ([B]ADC.Read[/B](0) + 1) * 500 / 1024
[B]End [/B][B]Function[/B]
// sampled AD value...
[B]Dim [/B]ADVal [B]As Word[/B]
// initialise and clear LCD...
[B]ADCON1 [/B]= $07 // PORTE as digital (LCD)
TRISA.0 = 1 // configure AN0 as an input
ADCON1.7 = 1 // set analogue input on PORTA.0
[B]DelayMS[/B](500)
[B]LCD.Cls[/B]
// main program loop...
[B]While [/B]True
ADVal = ADInAsVolt
[B]LCD.WriteAt[/B](1, 1, "DC Volts = ", [B]Convert.DecToStr[/B](ADVal / 100), ".", [B]Convert.DecToStr[/B](ADVal, 2), " ")
[B]DelayMS[/B](250)
[B]Wend[/B]
I simply have a problem with some of your more abrasive and offensive comments.
you're 14 years old and don't really know better
your moron factor is going to climb through the roof
doesn't this guy have his own soap-box web site where he can spout off any lame opinions