Continue to Site

Welcome to EDAboard.com

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.

90s2313 with Codevision

Status
Not open for further replies.

pulse0

Newbie level 4
Joined
Apr 23, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
I'm new to microcontroller programming. I'm trying to build a simple program that will blink a LED on pin 12 (PB0).
Here is the rough sketch of my circuit.

Can anyone please give me the full C code for this simple program an then I will build on that and add more components to this circuit.

Also can someone please help me with:
1> how to set pins for output and input?
2> how to retrieve a value from an input pin?
3> how to send data to to output pin?


I would reallllly appreciate any kind of help

sorry about the rough sketch again.
 

Hi
see codevision help

just type in while loop
DDRB=0x01;
PORTB.0=1;
delay
PORTB.0=0;
delay

port direction DDR+PORT_NAME e.g. DDRB.
retrieve a value PIN+PORT_NAME e.g. PINB.
send data PORT+PORT_NAME e.g. PORTB.
 

thanks for the reply, greatly appreciate it!!!


I built that circuit and burned that program on the chip it does not seem to work....
Does this chip has an internal oscillator or I will have to use an external crystal oscillator on the XTAL1 and XTAL2 lines?
 

I think it can be used with or without an external osc
 

It should be works without external oscilator, just check the CKOPT and CKSEL and make sure your configuration is right. To look the configuration i use ponyprog, try search in Google for the program.
Best regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top