<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/1655" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-05-13T10:22:11+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/1655</id>

		<entry>
		<author><name><![CDATA[mschoeldgen]]></name></author>
		<updated>2009-05-13T10:22:11+02:00</updated>

		<published>2009-05-13T10:22:11+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9303#p9303</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9303#p9303"/>
		<title type="html"><![CDATA[Re: HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9303#p9303"><![CDATA[
I'm sorry for the late resonse but i just recently found this wonderful software. I've been experimenting a lot with it and perhaps i'm able to give some hints. I'm compiling and flashing with AVR Studio on XP, btw and use the ISPMkII programmer. <br />1. Set Device and F_CPU in your makefile . Sounds trivial but is an absolute necessity. In AVR Studio you should enter Device and Frequency in the Options for your project. <br />2. In case you cannot find a hardware wiring for your CPU from one of the examples , use INT0 for the D+ line and Bit0 of the same port for D- ( gee, i hope i didn't confuse them now <img class="smilies" src="./../../../images/smilies/icon_razz.gif" alt=":P" title="Razz" /> ) . Using Bit1 on my ATTiny's didn't work at all. <br />3. If possible run your CPU from a crystal. The internal RC oscillator does work at least on the 25/45/85 but is a bit more unreliable than the crystal. I'd also think that the 2313 again uses a different procedure to calibrate it so the provided examples have to be modified. <br />4. Provide sufficient power while programming your chip. Most of the Tiny will require at least 3.6 Volt when running at 16-18 Mhz. If you're in for the 12Mhz version this shouldn't be a problem.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2242">mschoeldgen</a> — Wed May 13, 2009 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-04-23T09:31:08+02:00</updated>

		<published>2009-04-23T09:31:08+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9033#p9033</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9033#p9033"/>
		<title type="html"><![CDATA[Re: HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9033#p9033"><![CDATA[
Hey guys,<br /><br />I am really in need of some help. I want to get this thing rolling by this week. Please someone drop some suggestions here.<br /><br />Thanks!<p>Statistics: Posted by Guest — Thu Apr 23, 2009 9:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-04-22T10:09:58+02:00</updated>

		<published>2009-04-22T10:09:58+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9010#p9010</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9010#p9010"/>
		<title type="html"><![CDATA[Re: HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=9010#p9010"><![CDATA[
Hey Rickie,<br /><br />could xou do me a huge favour and paste the whole main.c and the fuse setting here?<br />I can't get the code running on my ATTiny2313. Something is missing... I don't know what it could be. I changed all he registers for timing etc. but still the Tiny doesn't seem to work.<br /><br />Thank you!!!<br /><br />Greeting from Germany<br />Goeck<p>Statistics: Posted by Guest — Wed Apr 22, 2009 10:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-08-21T15:20:22+02:00</updated>

		<published>2008-08-21T15:20:22+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6044#p6044</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6044#p6044"/>
		<title type="html"><![CDATA[HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6044#p6044"><![CDATA[
Well I got it to work now... was my own fault.<br /><br />With the MAKEFILE i had; i could not set the fuses and burn the program at the same time....<br /><br />I removed the part where it set fuses and then it startet to write program again<br /><br />///Ricke<p>Statistics: Posted by Guest — Thu Aug 21, 2008 3:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-08-21T14:44:26+02:00</updated>

		<published>2008-08-21T14:44:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6043#p6043</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6043#p6043"/>
		<title type="html"><![CDATA[HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6043#p6043"><![CDATA[
Looks like my programmer or chip stopped working.<br /><br />I programmed the Attiny2313 with a blink led demo and i get no error but the HIDKeys program is still in the chip =(<p>Statistics: Posted by Guest — Thu Aug 21, 2008 2:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-08-21T12:38:27+02:00</updated>

		<published>2008-08-21T12:38:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6042#p6042</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6042#p6042"/>
		<title type="html"><![CDATA[HIDKeys converted to Attiny 2313 problems (understand C-code]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1655&amp;p=6042#p6042"><![CDATA[
Hi<br /><br />I'm a beginner...  that said I managed to convert and run the HIDKeys in an Attiny2313.<br /><br />Problem is that I'm terrible at C.<br /><br />I can successfully type A,B,C,D,E,F etc but the pin layout for Atmega8 and Attiny2313 differs so when I release the button I get QQQQQQQQQQQ.... - and that indicates PD7 key down (and that one dont even exist on a Attiny2313)<br /><br />But I only neeed 8 keys instead of 17...  so i was going to use PB0-PB7<br /><br />I don't fully grasp the HIDKeys program... And tried and change this code:<br /><div class="codebox"><p>Code: </p><pre><code>/* The following function returns an index for the first key pressed. It<br /> * returns 0 if no key is pressed.<br /> */<br />static uchar    keyPressed&#40;void&#41;<br />&#123;<br />uchar   i, mask, x;<br /><br />    x = PINB;<br />    mask = 1;<br />    for&#40;i=0;i&lt;8;i++&#41;&#123;<br />        if&#40;&#40;x &amp; mask&#41; == 0&#41;<br />            return i + 1;<br />        mask &lt;&lt;= 1;<br />    &#125;<br />    return 0;<br />&#125;<br /></code></pre></div><br /><br />Changed so it uses 0-7 PB instead ot only 0-5..... and then I wiped out the stuff for PINC and PIND<br /><br />Problem is that PIND keys still work and PB6 and PB7 still don't produce any keypress (PINC dont exist on attiny2313)<br /><br />I also changed the #define NUM_KEYS 8  /* instead of 17 */<br /><br /><br />Have some ideas that I need to change something concerning <br />static const uchar  keyReport[NUM_KEYS + 1][2] PROGMEM = {<br />/* none */  {0, 0},                     /* no key pressed */<br />/*  1 */    {MOD_SHIFT_LEFT, KEY_A},<br /><br />etc....<br /><br />But i tried to change all to KEY_Z and I still write A,B,C,D etc so this try didnt help me either.<br /><br /><br />Some one care to explain a bit and point me into the right direction ?<br /><br />Saw that a guy on the forum had done a &quot;Hello world&quot; when he pressed the PD0 key but the example code was gone =(  maybe that would have helped me to understand.<br /><br />Appreciate all help and pointers I can get.<br /><br />Think i got the fuses and hardware all working correctly....  now i only need to understand the C code fully.<br /><br />////Ricke<br /><br />[/code]<p>Statistics: Posted by Guest — Thu Aug 21, 2008 12:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
