![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hello All, Is there a way to pass a reference around to a particular PIN in assembly for the SX microcontroller? I know I can declare a variable such as Code: LED_a equ RA.0 LED_b equ RA.1 Code: _param1 ds 1 Code: SetLedOutput
cje _param1,#0,color_0
cje _param1,#20,color_1
cje _param1,#50,color_2
cje _param1,#254,color_3
ret
color_0
clrb _param2 ;Hopefully _param2 contains a pin reference
ret
color_1
'some pwm code and conditional
setb _param2
ret
color_2
'some pwm code and conditional
setb _param2
ret
color_3
'some pwm code and conditional
setb _param2
ret Then in my main program use it like this: Code: Main
mov _param2,LED_a
mov _param1,COLOR1
call SetLedOutput
mov _param2,LED_b
mov _param1,COLOR2
call SetLedOutput Also the above code doesn't seem to work since I can't seem to move LED_a or LED_b into _param2, is there a way to accomplish this? Any help would be greatly appreciated | |
| |
| | (permalink) |
| I'm sorry... please clarify what is SX microcontroller... i've never seen such a kind of micro... made by which co..? Regards, Simran..
__________________ Simran.. 8051 Specialist.. | |
| |
| | (permalink) | |
| Quote:
http://www.parallax.com/detail.asp?p...id=SX28AC/DP-G | ||
| |
| | (permalink) |
| I've not used the Parallax assembler for over a year now, but they have some good tutorials for it on the tech-tools site http://www.tech-tools.com/ | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| AT89C4051 assembly code compiler question | fiveten | Micro Controllers | 5 | 26th March 2006 07:37 PM |
| Converting S-Video to Composite: Beginner schematic question | chson | General Electronics Chat | 2 | 29th June 2005 02:49 PM |
| serial assembly question | evandude | Micro Controllers | 5 | 8th September 2004 06:37 AM |
| Assembly Language Question | Jeggyman | General Electronics Chat | 6 | 30th January 2004 10:54 PM |
| Beginner question with a twist | Somnambulo | General Electronics Chat | 4 | 20th July 2003 04:24 PM |