Assembly programming need help ?

Status
Not open for further replies.

Thread Starter

saha

Joined Jun 1, 2006
53
hi jasper_86,

i hope you know that when you receive some data through serial port then an interrupt will occur and whatever is in the location org 0023h will be executed, first try to switch off the led and switch it on when you receive any data through serial port. try this code1. the code 2 will transmit the data whatever it has received immediately and make the led on, don't press the keys continuously from the pc.

for ex:

code 1:

org 0023h

setb p1.0 ; p1.0 is where led is connected
reti


code2:

org 0023h

mov a,sbuf
setb p1.0
mov sbuf,a
stay:
jnb ti,stay
clr ti
reti

regards,

saha
 

Thread Starter

saha

Joined Jun 1, 2006
53
hi princemay,

iam sorry i couldn't help you as don't know abt pic, by the way what fro you need to know abt pic, if you 're at the start of learning it. you can rethink t choose 8051 for your application. i can help you a lot. questions doubts, problems are welcome regarding 8051.

regards
saha
 
Hi Saha,

I would like to ask you about my lab experiment which is the problem is exactly same like hohozai (24-7-2006) and aziejal (6-9-2006). Could you please send me the solution of the problem as soon as possible because i need to submit my experiment in one week. Waiting for your reply. Thank You. ;)
 

Thread Starter

saha

Joined Jun 1, 2006
53
Hi MissLessette,

Iam working on it, iam bit busy with my work. iam at the fag end of the program.The program will be out soon also aziejal has given me a good doc reg the details, and is impatient abt the result. It'll be completed within a day or 2.Mean while just checkout maybe the other two will be your group mate for your project.

Regards,
saha
 
Hi Saha,

It's ok.. take ur time.. i thought u already have the solution that u gave to them that's why i asked u to send it to me as soon as possible.. i don't know anything about them and where they come from.. but it is good to see them here and face the same problem to complete our task... :p hope to hear from u soon... take care... thank you..:)
 

Thread Starter

saha

Joined Jun 1, 2006
53
Hey guys,
If you donno abt the techfest being conducted pls check out this link . click on it and if you are really interested then find the details of building a machine with "INTELLIGENCE " TO cross hurdles. As it is conducted only in jan you'll have ample time to develop your machines, if you formed the logic, and the machine then iam here to help you regarding programming and hardware design.

http://www.techfest.org/competitions/

Prizes worth 1 LAC!!!!!!!!!!!!! . Remember It is worth the effort.

Best of Efforts
saha
 

Thread Starter

saha

Joined Jun 1, 2006
53
WHEN THE GOING GETS TOUGH THE TOUGH GETS GOING...THIS IS AN INTERNATIONAL LEVEL COMPETITION SOME CONCESSION IS ALSO AVAILABLE LIKE AIRTICKETS ARE PAID BY IITB ,ANYWAY GET THE DETAILS FROM THE LINK. THE CERTIFICATE WILL SPEAK THE REMAINING.

regards,
saha
 

aziejal

Joined Sep 6, 2006
3
I hv some trouble here.. let's say I hv some music notes from address 50H to 57H (one note in an address), how can I play the music notes from address to address.. TQ in advance.
 

jasper_86

Joined Aug 23, 2006
2
saha,

the actual prob is the data is leavin sbuf and then the data is nowhere to b found.....an u help me wit this prob.....an u tel me wer wil the data b....its does not reach P3.0 and P3.1.......then wer is it goin????...

jasper
 

BigTom

Joined Sep 21, 2006
4
Greetings Saha,

I have buillt the 89C52 microcontroller shown here http://users.rcn.com/weyand/tractronics/MicroController/mr89c52f.htm but I don't know how to write the code to finish my project. I'm building a miniature "Spider" amusement park ride and I have small LEDs in the bottom of the "arms" that I want to light like the real ride. I can use the pinouts to light the LEDs in correct order as shown on the scematic. I also have made a matrix chart , that I can email to you, that shows how I want the LEDs to light if you can help me.

I good at building but not good at coding. The only coding I've done is writing a small program in PBasic to make a servo contoller work and another program to make an eight relay board work.

I'm hoping you can help me.

Reagrds,
BigTom
 

Thread Starter

saha

Joined Jun 1, 2006
53
hi jasper,
1. check whether u've enabled the serial transmit
2. what's the frequency of your clock ? if it is 12 Mhz, then there won't be any problem.
3. user timer 1 in the auto reload mode. refer www.8052.com tutorials section http://www.8052.com/tutser.phtml for setting up the baud rate. are you using keil compiler? if so simulate it and see if interrupt is occuring or not continuously. sometimes the timer 1 will give interrupt for the first time and interrupt would be vectored to 001bh, if you have written some other code or didn't write "RETI" instruction then the 8051 will think that it had not yet finished servicing and stop the timer till you clear the overflow flag. if you don't have keil compiler you can seach in the google for keil compiler and the evauation version is 2 KB is much more for testing this routine.

4. If you feel that the initialization is ok then pull down the RXD Pin of the 8051 to the gnd thru 10k resistor and make the program to continuously, in that way you can find the asynchrounous transmission of the data.

5. you refer to the previous attachment reg serial port transmission in this forum in page no 1. you'll find the solution.

6. are you using MAX 232 IC for serially transmitting the data to the PC?. WHAT'S THE BAUD RATE?. SETUP THE SAME IN THE HYPERTERMINAL OF THE PC. check the hyperterminal setting by shorting the 2&3 pin of your Serial port connector on the PC and type some character keys the same will be seen in the hyper terminal screen. it ensures that it can TX and RX at the specific baud rate.

7. one more imp thing are you sure whether the program is running in the MCU?. hope you're dwnloadingthe code into the chip, so connect the 31st pin of the MCU to VCC which will enable the processor to execute from the on chip ROM space.

8. hope your problem would be solved. get back to me if you still have problem.

NOTE: TO ALL THOSE WHO ARE BEGINNERS PLS KEEP SOME TESTED ROUTINES HANDY LIKE SERIAL TRANSMIT, BLINKING LED, SERIAL RECEIVE, WRITING TO LCD. WHENEVER YOU WRITEA PROGRAM INCUDE SOME DEBUGGING LINES. IT'LL MAKE SURE THAT THE PROGRAM IS RUNNING IN THE MCU. ALSO IF YOU'VE STRATED TO BUILD HARDWARE USING 8051 DO MAKE SURE YOU HAVE ATLEAST 1 OR 2 LEDS CONNECTED TO ANY OF THE PORT PINS. THIS WILLHELP YOU IN DEBUGGING EASILY.

............WILL COME SOON............
saha
 

Thread Starter

saha

Joined Jun 1, 2006
53
hi aziejal,

i've got your mail and though it seemed to be simple it is a bit complex. i've sent the flowchart to your i.d. the program will also be out soon.

regards,
saha
 

Thread Starter

saha

Joined Jun 1, 2006
53
HI ALL,

I can write / help you write program for your application. if you are building a big project then you divide it into small subroutines and if you tell me what each subroutine has to do then it'll be easy for me to send the tested subroutine to you at the earliest. then try to build the program on your own with the tested subroutines as the blocks. provide exhaustive comments so that it'll be easy to follow and debug. try to think this way, what should the program do immediately after power up.

Remember the industrial environment is still tough and demands somethingmore. And don't MAR that you've successfully written a humongous code. The industry people will ask a very small specification to be added on the top of your code it is " WHENEVER THE SYSTEM STOPS OR HANGS NEXT TIME IF IT RUNS IT HAS TO PROCEED FROM THE EXACT POINT WHERE IT HAD STOPPED" .

FOXED!!!!!!!!!!!!
Do you proove your logical bent to them ?.

know abt Mixed Signal Processor MSP430Fx,watch dog timer DS1232,and what it will add to the cicuit?. If you are building a trainer kit then wait a moment there is a 8051 by cygnus it as 8 channel 12 bitADC and some 5 or 8 channel DAC on the CHIP itself . the IC name is 8051F0005, google it.


ADVICES ARE EASILY AVAILABLE. BUT THE QUALITY ONES ???

will come soon...
saha
 

Thread Starter

saha

Joined Jun 1, 2006
53
HI ALL,
Anyone out there knows about image processing either thru Digital camera or thru Infra red sensor. iam in a project where i've to get the data like how far is the objects from the sensor. The manipulation i'll doit . but i need to know the difference between the surface and the object. The surface is not going to be same and i don't have the option of comparing with a prerecorded texture template. In short i've to make out the presence of objects. iam new to this field and i could picturize to some extent regarding data reception analysing pixel by pixel. i felt something logically right like this. The IR sensor is the best as it can be used in the Darkness of the night. Ok i'll give the detail later but someone please respond me. send me your mail id so that i'll mail some big description as attachment.

Regards,
saha
 
If a serial interrupt occured in main program, how to start the execution of serial port program (assembly) which is written outside main assembly program.
 
If a serial interrupt occured in main program, how to start the execution of serial port program (assembly) which is written outside main assembly program.
 
hi saha,
in my application, the main program checks for interrupt from serial port for a period of 3seconds, if interrupt comes, the contents of eeprom has to be read, otherwise, do normal operation. this is my task. i have written a assembly program for serial reading of eeprom separately. in my main program how to invoke the serial isr and how to call external program when serial interrupt occurs. i am using 89c52 controller and MAX 220 as line driver and receiver.
 
Status
Not open for further replies.
Top