Hello at all,
i try to build a little prog for a atmega8, but i become every time the error like in the subject. I would like realize a PWM without the PWM_library. Here is my code:
[code]
program PWM
sub procedure wait
Delay_ms(200)
end sub
DIM I AS WORD
MAIN:
DDRB.1 = 1
TCCR1A = $83
TCCR1B = $01
I = 1
while true
FOR I = 0 to 255
OCR1AL = I
wait
NEXT I
wend
end.[/code]
Once the translation has already works successfully and was also successfully transferred to the uC.
Thanks for Help
Best regards
OEP
Get Error 0:0 E-0 Linker error: Routine not found: main
No problem ....
This code compile ok at me:
This code compile ok at me:
Code: Select all
program PWM
dim i as word
sub procedure wait
Delay_ms(200)
end sub
main:
DDRB.1 = 1
TCCR1A = $83
TCCR1B = $01
i = 1
while true
for i = 0 to 255
OCR1AL = I
wait
next I
wend
end.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro