Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I'm writing a program for a PIC12HV615 to control the power to a computer and properly shut it down based on inputs from the ignition of a car and a momentary button. I'm writing the code in mBasic. Here's what I have so far:
'Raspberry Pi Control
STATE VAR BYTE
STATE = 0
MANOFF VAR BYTE
MANOFF...
I posted the C because that was the only language I was familiar with :P
Like I said, I know very little about MCU's and assembly code, that's why I chose FlowCode. Your code looks much MUCH simpler than what FlowCode spit out :P
Here's the ASM it gave me...
That's just the text representation of what I have set up in the flow code, what compiler/ide would you recommend?
Edit: This is the compiled C from FlowCode. Does this look right?
//************************************************************************************
//**
//** File name...
I figured I'd start with flow code, and this is what I've come up with so far:
Lbl A
Input B0 as IGN
If IGN=1 {
Output 1 to B1
}
Else {
Goto Lbl A
}
Lbl B
Input B0 as IGN
If IGN=0 {
Delay 300s
Input B0 as IGN
If IGN=0 {
Output 1 to B2
Delay 120s
Output 0 to B1
Output 0...
I'm pretty sure the lack of sleep function has to do with cost (that's the reason it doesn't have a power button).
Thanks for the advice! I'll try these out!
I actually do have access to a pic programmer, some one I know owns an electronics repair shop, so that's not a problem! And unfortunately the pi doesn't have that capability, I've perused the web quite a bit, and this seems to be the best solution.
I've got a dc-dc power supply to handle the power (9-18v in, 5v out). But how would I go about writing the code for the pic? I know basic java, but I have no idea if that will help.
- - - Updated - - -
I've put together a sort of flow chart for what I need the pic to do:
1 input, 2 Outputs...
Conditional Power Control Help
Let me start off by saying that I really don't know much about microelectronics, but i know the basics. I'm decent programming wise, but I need help with one thing.
I need a PIC (or other MCU?) to control power to a Raspberry Pi I'm going to hook up in my car. I...
I'm building a simple 4 function calculator out of basic logic circuits and SRAM (if it's best?).
For addition and subtraction I'll do 8-bits, so 8-bits plus overflow out, these circuits aren't the problem.
For Multiplication I have a circuit the does basic 4-bit x 4-bit multiplication, but I...
OK, I only asked because I saw another circuit that had the output going right into the relay. And one more, one more question ;p
What scenarios would I use MOSFETs instead of transistors and/or relays?
I'm very new with pcb's and electronics in general. I've created a schematic for a circuit I'd like to build.
What I'm hoping it'll do is once the power is turned on, the output will go high for ~1 second, then remain low, so I went with a 10uF poly film cap and a 100k 1% resistor to get the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.