Click here to Skip to main content
15,877,103 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
AnswerRe: cheap and interesting hardware for practising Pin
Richard MacCutchan29-Aug-10 21:13
mveRichard MacCutchan29-Aug-10 21:13 
AnswerRe: cheap and interesting hardware for practising Pin
jujiro10-Sep-10 5:57
jujiro10-Sep-10 5:57 
QuestionZwCreateFile parameter [modified] Pin
followait29-Aug-10 13:59
followait29-Aug-10 13:59 
QuestionATmega16 simulation Pin
ammeer_a29-Aug-10 12:07
ammeer_a29-Aug-10 12:07 
AnswerRe: ATmega16 simulation Pin
Luc Pattyn29-Aug-10 12:25
sitebuilderLuc Pattyn29-Aug-10 12:25 
GeneralRe: ATmega16 simulation Pin
ammeer_a29-Aug-10 12:31
ammeer_a29-Aug-10 12:31 
AnswerRe: ATmega16 simulation Pin
Luc Pattyn29-Aug-10 12:33
sitebuilderLuc Pattyn29-Aug-10 12:33 
GeneralRe: ATmega16 simulation Pin
ammeer_a29-Aug-10 12:45
ammeer_a29-Aug-10 12:45 
i will explain the problem and the solution :
i wrote a code just to take an analog i/p and convert it to digital then send it to portc
and the output could be seen on leds connected to portc

the could is easy and has no errors :
.include "m16def.inc"

.def temp = r16
	
.org $000
	rjmp start

start:
	cli

	ldi temp,$5f
	out spl,temp
	ldi temp,$04
	out sph,temp

	ser temp
	out ddrc , temp

	clr temp
	out ddra , temp

	
	rcall adc_initial

	sei

Main_loop:

in temp , adch   ;read adc high
out portc , temp

rjmp Main_loop





adc_initial:
	sbi acsr , acd

	ldi temp , $60				;single i/p (ADC0)
	out admux , temp    		; *1 gain - left adjust result
								;ref = Vcc
						

	ldi temp , $a6				;adc enable  - auto trigger
	out adcsra , temp			;/64 prescaling - no interrupt



	ldi temp , $00				;free running mode - no pull up
	out sfior , temp


	sbi adcsra , adsc			;start conv
ret



when i simulated the program on proteus it doesn't work at first , because i used to connect the AVR without connecting the Vcc pin and it was working so in all programs with no problems , but in this code you have to connect the Vcc pin Smile | :)
AnswerRe: ATmega16 simulation Pin
Luc Pattyn29-Aug-10 12:50
sitebuilderLuc Pattyn29-Aug-10 12:50 
GeneralRe: ATmega16 simulation Pin
Dan Neely30-Aug-10 9:50
Dan Neely30-Aug-10 9:50 
GeneralRe: ATmega16 simulation Pin
Luc Pattyn30-Aug-10 10:27
sitebuilderLuc Pattyn30-Aug-10 10:27 
GeneralMy first question in programing forum Pin
Single Step Debugger25-Aug-10 8:19
Single Step Debugger25-Aug-10 8:19 
GeneralRe: My first question in programing forum Pin
AspDotNetDev25-Aug-10 8:32
protectorAspDotNetDev25-Aug-10 8:32 
GeneralRe: My first question in programing forum Pin
Single Step Debugger25-Aug-10 8:46
Single Step Debugger25-Aug-10 8:46 
JokeRe: My first question in programing forum Pin
HimanshuJoshi25-Aug-10 9:07
HimanshuJoshi25-Aug-10 9:07 
GeneralRe: My first question in programing forum Pin
Single Step Debugger25-Aug-10 9:32
Single Step Debugger25-Aug-10 9:32 
GeneralRe: My first question in programing forum Pin
Chris Maunder25-Aug-10 9:59
cofounderChris Maunder25-Aug-10 9:59 
GeneralRe: My first question in programing forum Pin
Single Step Debugger25-Aug-10 10:01
Single Step Debugger25-Aug-10 10:01 
GeneralRe: My first question in programing forum Pin
Roger Wright25-Aug-10 10:52
professionalRoger Wright25-Aug-10 10:52 
GeneralRe: My first question in programing forum Pin
Single Step Debugger25-Aug-10 11:28
Single Step Debugger25-Aug-10 11:28 
GeneralRe: My first question in programing forum Pin
fat_boy27-Aug-10 22:32
fat_boy27-Aug-10 22:32 
QuestionMixing 100MHz and Gigabit Pin
OriginalGriff25-Aug-10 0:15
mveOriginalGriff25-Aug-10 0:15 
AnswerRe: Mixing 100MHz and Gigabit Pin
fat_boy25-Aug-10 1:15
fat_boy25-Aug-10 1:15 
GeneralRe: Mixing 100MHz and Gigabit Pin
OriginalGriff25-Aug-10 1:25
mveOriginalGriff25-Aug-10 1:25 
GeneralRe: Mixing 100MHz and Gigabit Pin
Dan Neely25-Aug-10 3:07
Dan Neely25-Aug-10 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.