# Basic to Assembly

Status
Not open for further replies.

#### Mr.K

##### New Member
program by 3vo for a dimmer can anyone convert this to asm for a PIC16F628a? I will rep(now that I know what the hell it is lol)
-Thanks Mr.K
Code:
// main program...
If PWM.SetFreq(5000) Then
Duty = 0
While true
PWM.SetDutyPercent(Duty)
If ( (sw0 = 1) And (Duty < 10) ) Then
Inc(Duty)
DelayMS(10)
While sw0 = 1 Wend
EndIf
PWM.SetDutyPercent(Duty)
If ( (sw1 = 1) And (Duty >0) ) Then
Dec(Duty)
DelayMS(10)
while sw1 = 1 wend
EndIf

Wend
EndIf

#### Russ Hensel

##### New Member
Yes a compiler can do the conversion. There are several for the 18 series, BoostC ( demo version ) and GreatCow Basic are 2. You may need to do some conversion to make it compile.

#### 3v0

##### Coop Build Coordinator
Forum Supporter
I paid my ASM dues several times over. No thanks.

This is the thing. When I helped the author of the Swordfish Basic code he was trying to learn to write code.

What I see here is a person attempting to paste bits and scraps together without learning any language. If you want to do that sort of thing maybe you should be looking at an adrinuo(sp?).

#### Mr.K

##### New Member
Yes a compiler can do the conversion. There are several for the 18 series, BoostC ( demo version ) and GreatCow Basic are 2. You may need to do some conversion to make it compile.
are those just specifically for the 18 series in particular or can it be for the 16 series

##### Banned
Arduino.
If you're using ASM for some reason I would definitly recommend something like the Arduino, which is an AVR micro controller. They're MUCH easier to program in ASM that PIC's are.

#### futz

##### Active Member
Arduino.
If you're using ASM for some reason I would definitly recommend something like the Arduino, which is an AVR micro controller. They're MUCH easier to program in ASM that PIC's are.
Umm... You don't program an Arduino in assembler. You program it in a C-like language (interpreted? not sure).

You're probably thinking of a bare AVR chip. And they are maybe a bit easier to program in asm, but not too terribly much.

Last edited:

##### Banned
If he's having problem with basic code he's gonna choke on converting Nigels code to work with his particular model of PIC, worth a shot though.

#### Russ Hensel

##### New Member
are those just specifically for the 18 series in particular or can it be for the 16 series
Sorry, both the 16 and 18 series, ( definately for boost ).

Status
Not open for further replies.