Jump to content

help with project

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
wenwang

wenwang

    Newbie

  • Members
  • Pip
  • 4 posts
i'm facing a problem with my final year project.

the situation is,
if switch 1 is pressed, LED will light up and when switch 2 is pressed again, the LED will go off.
I have attach a text file, which i done half way.
So i need someone to guide me along with the programming part.

For your information, I'm using the PIC16C745 microchip. :) :)

Attached Files

  • Attached File  Doc1.txt   534bytes   39 downloads


#2
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
I'm not sure what I am looking at here. Are these binary numbers for turning on and off the LED?

#3
wenwang

wenwang

    Newbie

  • Members
  • Pip
  • 4 posts

Lop said:

I'm not sure what I am looking at here. Are these binary numbers for turning on and off the LED?


the binary are to set the input/output for the mircochip.
1 as input
0 as output

#4
wenwang

wenwang

    Newbie

  • Members
  • Pip
  • 4 posts
i re-write the program again with comments on it..
so i think it will be easier for you all to understand what i'm writing.
anyone whose know how to edit my program to uses 2 switches to on/off LED can reply asap ?
as tml i need to hand up to my supervisor.
thank you!

Attached Files

  • Attached File  Doc1.txt   769bytes   43 downloads


#5
rameshkumar

rameshkumar

    Newbie

  • Members
  • PipPip
  • 20 posts

wenwang said:

i'm facing a problem with my final year project.



the situation is,
if switch 1 is pressed, LED will light up and when switch 2 is pressed again, the LED will go off.
I have attach a text file, which i done half way.
So i need someone to guide me along with the programming part.

For your information, I'm using the PIC16C745 microchip. :) :)

Hi
you have one problam because you call to main programme which out to on you have declare of main method to call a noop but you have declare of portb,1 those have retrive of port number0 but post are declare of 1to o some problam are declare and some problam have call method

#6
rameshkumar

rameshkumar

    Newbie

  • Members
  • PipPip
  • 20 posts
Hi
you have one problam because you call to main programme which out to on you have declare of main method to call a noop but you have declare of portb,1 those have retrive of port number0 but post are declare of 1to o some problam are declare and some problam have call method