News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Hello All

Started by Model T101, March 13, 2010, 01:21:11 PM

Previous topic - Next topic

Model T101

Good day to all on the site.

I just registered today and in accordance with advice from the site administrator, i have written this message to prove i am human and not some malware bot or spyware.

I am a full time student at university reading Electronics and Communications Engineering. We do a lot of hardware/software modules and the language of choice is Assembly. We do not use any other language as our lecturers say that we must understand the underlying hardware architecture and the way in which our programs interact with it at a very low-level.

It is not an easy language to learn, but it has certainly given me and my fellow students an appreciation of what goes on 'right down to the metal'.


I am looking forward to learning as much as i can about the language and it is nice to find a place where people believe assembly language still has it's place in the software world.



By the way, i found this article on the web .... i found it to be an interesting read.

http://onlamp.com/pub/a/onlamp/2004/05/06/writegreatcode.html?page=1




Regards,

Model T101

dedndave

welcome to the forum T101
Randy, the author of that article (and book) is a forum member (luckily)
we have a few high-powered guys in here
ps - i am not one of them - lol
i am an EE, though   :P

Model T101

hello and thanks ...

Vortex

Hi T101,

Welcome to the forum.

Model T101

Hello again,

             I would appreciate the experience of those on the site with a certain type of functionality i am trying in include in a program.

Basically, i have written a program to control the movement of a robotic arm via signal pulses sent to a series of dc stepper motors controlling the various joints.
the program interfaces with a numeric keypad such that when a key is pressed, the appropriate subroutine is executed (and the arm moves in a certain direction)

The keypad is scanned for detection of any key press that is made.

The hardware includes a PIC16 microcontroller which controls the motors.

The thing is, the program scans the keypad all the time ... i don't want it to do that really. It should only do it when the keypad is being used. If the keypad has been inactive for a while (no key has been pressed). then the keypad should 'rest' as it were.

I have been reading about the 'Interrupt' and 'Sleep' commands .. and i have figured that i could use them (based upon what i have read about their properties) .. in such a way that the keypad would be dormant when not in use (in sleep mode), but upon pressing a certain key on it ... an interrupt would fire which would then make the program commence scanning the keys.

After a period of time has passed and the scan has detected no further pressing of the keys, it should go back into sleep mode until the next time again.

problem is ... i am not fully confident as to how to implement this within my code. (the program as it is, works fine though)

I am using PORTB for my keypad and PORTA for output signals to the robot's motors

I have a spare pin on PORTB that i do not use (RB0), which i understand supports interrupts. I am just clueless as to what to do from here as i do not want to mess up my code which works fine in it's present state.

Just don't think that scanning the keys all the time (even when not in use) is practical really.


Any suggestions would be appreciated.

Thanks in advance.

BlackVortex

#5
So, you have an external keypad ?

Why not use the keyboard keypad, so that you can just use keyboard hooks ? Unless you must use that.

You should make a new thread, not many people ar einterested in "Hello All" threads ...

Model T101

thanks for advice ..... have moved my query to a new named thread ....where it may be seen by more people