Maybe I didn't explain it right.
Lets say you had a keypad with button 0 to 10. Each button press is read as a number under normal operation. Now put a big read button on the wall and allow that...
Type: Posts; User: plyrathrt; Keyword(s):
Maybe I didn't explain it right.
Lets say you had a keypad with button 0 to 10. Each button press is read as a number under normal operation. Now put a big read button on the wall and allow that...
So I have been thinking about making a project to create macros but can't think of a creative way to save on the code space.
Here is a simple way of explaining what I am attempting to do.
So...
I set the tris register to output and the port latch to low (I drive the LED by outputing low).
By setting the tris and port, shouldn't that stay in the state I set until a reboot or a part of...
It returns to the loop it came from. I will put up the routine causing the issue when I get back to my office.
That sets the oscillator tuning register to maximum frequency however, after seeing it, it looks as though I am missing a bit.
I also don't understand the other question you asked
I have a funny issue I have been dealing with for some time and can't figure it out.
I am using a 16F1829 and have the LED on porta.5
During my startup routine, I have porta.5 setup for...
While I couldn't figure out the logic to all the ('s, I tried it anyway but I get "bad expression" when compiling.
I have tried it many different ways with no luck. I spoke with Micro-engineering...
Ran in to some issues with code space on my mico and am trying to get more room. The question I have is can you use AND OR in combination together?
For instance, I have a subroutine which repeats...
I will try the example above. If anyone else has any other suggestions please let me know.
I have my project setup to check for button presses on a pin. Simple IF *** = 0 THEN ****
I would like to be able to count the button presses like if 3 button presses are made within a certain...
It only flashes once when the button is pressed. I want to get it so that when I press it the first time, it flashes the led once, press it again, and it flashes the LED twice, and so on.
My...
yes, in the initialization
when I write
main:
If button1 = 0 then test
goto main
test:
for a0 = 1 to 10
toggle led
pauseus 50000
I am trying to shrink my code down but I am still "learning". Here is a example of what I am attempting to do.
Say I use
HIGH LED : PAUSEUS 50000 : LOW LED : PAUSEUS 50000
Now if I wanted to...
I finally figured it out. I was an idiot and had a something stupid in the code.
They should be correct
ANSEL = 0
ADCON0 = 0
CMCON0 = 7
I don't know what gives. It's very agrevating. I am still playing with it.
I can't put a pull down resistor on there because grounding the contact I am trying to connect to will make it not function.
Is there any other way to make it accept .4v as low? Coding tricks or...
I have a pin that goes high (1.5v) when a button is pressed but when it's not pressed it's at .4v which the microcontroller can't see as "low". Basicly I need the microcontroller to see this .4v as...
It's only about a year old. It's also not a cheap one. I seem to be able to get the 883 working correctly now. The problem it was having was the A/D converter. That's also why it wouldn't work...
Setting Tris registers isn't the problem. It's making sure that the inputs are "digital" and the outputs are setup right.
18F's use the ADCON0, ADCON1 to select pins as digital but it doesn't seem...
Ok, if this thing pisses me off any more, I have the option to move to a 18F2221 or 18F4321.
How to I put RA0,RA1,RA2,RA3, RB0,RB1, and RB3 as inputs?
The rest need to be outputs and go HIGH...
Ok, I have found that it is leaking voltage somehow when the pin is told to go low. I tried reversing the pin state to a input instead of lowing it, but it will not flash the LED at all when i do...
3V. The datasheet shows a minimal 2v.
Ok, so I am doing some tests (light some LED's) with this microcontroller before making my application with it. The problem I am having is that using RA4, RA3, RB0, and RB1 as inputs, and everything...
I just switched to a 16F690 that I had a PDIP version of as well as a SOIC version. It's a few pins short of what I need but it's fine for testing the final product and the most important thing is,...