![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2008
Posts: 3
Rep Power: 0
![]() |
assembly help, please
I have to write a program that will produce two signals, at pins RAo and RA1. I have only just started using this language and have no clue.
I have started the program already and I need some help please. This is it so far. ; waveforms.asm title "waveforms.asm" list p=18f452, f=inhx32 #include <p18f452.inc> PORTA equ 0x01 start loop movlw b'0000 0001' movwf PORTA call delay100 movlw b'0000 0010' movwf PORTA call delay200 movlw b'0000 0000' movwf PORTA call delay600 movlw b'0000 0010' movwf PORTA call delay250 movlw b'0000 0000' movwf PORTA call delay600 movlw b'0000 0010' movwf PORTA call delay300 goto loop end I need to get this program to run this loop over. I know this must be a very simple program but I am studying mech eng not programming, but I want to learn this as well. I am curious why. Thanks for your help |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Nov 2007
Posts: 73
Rep Power: 1
![]() |
Re: assembly help, please
what chip are you programming?
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2008
Posts: 3
Rep Power: 0
![]() |
Re: assembly help, please
it is a PIC18F452, thats all i realy know
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Feb 2008
Posts: 3
Rep Power: 0
![]() |
Re: assembly help, please
I have included an upload, that gives a better idea of what I have to do, Can someone talk me through this and give me some ideas please.
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2007
Location: Ireland
Posts: 10
Rep Power: 0
![]() |
Re: assembly help, please
I'm not familiar with pics so I can't help much with the assembly.
You need to work out the high and low times of the pulses, and make the pins high and low for those times. Generate that waveform at RC0 first on its own, by making it high, calling a delay of 100uS, bringing it low and calling a delay of whatever that off time is, looping over, rather than trying to get both working together at first. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| quick assembly question | jbo423 | Assembly | 4 | Nov 12th, 2007 7:21 AM |
| Assembly Language | DaWei | Coder's Corner Lounge | 0 | Apr 26th, 2007 10:15 PM |
| GCC Inline Assembly | niteice | Assembly | 0 | May 23rd, 2006 4:11 PM |
| Assembly, Assembler? | v0id | Assembly | 15 | May 4th, 2006 8:52 AM |
| High Level Assembly? | Gink | Assembly | 3 | Apr 20th, 2005 11:34 AM |