Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 1st, 2008, 2:37 PM   #1
james1212
Newbie
 
Join Date: Feb 2008
Posts: 3
Rep Power: 0 james1212 is on a distinguished road
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
james1212 is offline   Reply With Quote
Old Feb 1st, 2008, 3:13 PM   #2
mbd
Programmer
 
Join Date: Nov 2007
Posts: 86
Rep Power: 1 mbd is on a distinguished road
Re: assembly help, please

what chip are you programming?
mbd is offline   Reply With Quote
Old Feb 1st, 2008, 3:40 PM   #3
james1212
Newbie
 
Join Date: Feb 2008
Posts: 3
Rep Power: 0 james1212 is on a distinguished road
Re: assembly help, please

it is a PIC18F452, thats all i realy know
james1212 is offline   Reply With Quote
Old Feb 4th, 2008, 7:05 AM   #4
james1212
Newbie
 
Join Date: Feb 2008
Posts: 3
Rep Power: 0 james1212 is on a distinguished road
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.
Attached Files
File Type: doc assembly.doc (77.0 KB, 6 views)
james1212 is offline   Reply With Quote
Old Feb 4th, 2008, 1:26 PM   #5
colin mac
Newbie
 
Join Date: Nov 2007
Location: Ireland
Posts: 18
Rep Power: 0 colin mac is on a distinguished road
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.
colin mac is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:00 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC