<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Roboternetz - Basic-Programmierung (Bascom-Compiler)</title>
		<link>http://www.roboternetz.de/community/</link>
		<description>Hier dreht sich alles um die Basic Programmierung mit dem sehr weit verbreiteten Bascom-Compiler für AVR Controller</description>
		<language>de</language>
		<lastBuildDate>Sun, 19 May 2013 06:19:28 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>30</ttl>
		<image>
			<url>http://www.roboternetz.de/community/images/misc/rss.png</url>
			<title>Roboternetz - Basic-Programmierung (Bascom-Compiler)</title>
			<link>http://www.roboternetz.de/community/</link>
		</image>
		<item>
			<title>AVR USB ISP, richtige Einstellungen in Bascom</title>
			<link>http://www.roboternetz.de/community/threads/61973-AVR-USB-ISP-richtige-Einstellungen-in-Bascom?goto=newpost</link>
			<pubDate>Thu, 16 May 2013 11:31:08 GMT</pubDate>
			<description>Hallo liebes Forum,  
 
ich habe mir diesen Programmer gekauft:...</description>
			<content:encoded><![CDATA[<div>Hallo liebes Forum, <br />
<br />
ich habe mir diesen <a href="http://www.shop.robotikhardware.de/shop/catalog/index.php?cPath=88" target="_blank"  >Programmer</a> gekauft: <a href="http://www.ebay.de/itm/AVR-USB-ISP-Programmer-ATMEL-ATMEGA-STK500-Neu-ATTINY-/370490000223?ssPageName=ADME:L:OC:DE:3160" target="_blank">http://www.ebay.de/itm/AVR-USB-ISP-P...E:L:OC:DE:3160</a><br />
<br />
Ich versuche jetzt die richtigen Einstellungen in <a href="http://www.rn-wissen.de/index.php/Bascom" target="_blank"  >Bascom</a> zu treffen.<br />
Ich habe als <a href="http://www.shop.robotikhardware.de/shop/catalog/index.php?cPath=88" target="_blank"  >Programmer</a> den Stk500 ausgewählt und den Com-Port der dem Porgrammer zugewiesen wurde angegeben.<br />
Ich habe <a href="http://www.rn-wissen.de/index.php/AVR-Einstieg_leicht_gemacht" target="_blank"  >AVR</a> Studio 4.xxx installiert und in <a href="http://www.rn-wissen.de/index.php/Bascom" target="_blank"  >Bascom</a> den Pfad zu der stk500.exe eingetragen.<br />
<br />
Ich bekomme aber keine Verbindung zu dem Chip.<br />
<br />
Hat jemand Erfahrungen mit diesem <a href="http://www.shop.robotikhardware.de/shop/catalog/index.php?cPath=88" target="_blank"  >Programmer</a> und kann mir helfen?<br />
Was für Informationen werden evtl. noch zur Analyse gebraucht?<br />
<br />
Crypi</div>

]]></content:encoded>
			<category domain="http://www.roboternetz.de/community/forums/41-Basic-Programmierung-%28Bascom-Compiler%29">Basic-Programmierung (Bascom-Compiler)</category>
			<dc:creator>jcrypter</dc:creator>
			<guid isPermaLink="true">http://www.roboternetz.de/community/threads/61973-AVR-USB-ISP-richtige-Einstellungen-in-Bascom</guid>
		</item>
		<item>
			<title>Wert in Variable einlesen ?</title>
			<link>http://www.roboternetz.de/community/threads/61910-Wert-in-Variable-einlesen?goto=newpost</link>
			<pubDate>Sat, 11 May 2013 05:31:09 GMT</pubDate>
			<description>Hallo, 
möchte über eine Infrarot Fernbedienung eine Tel Nr. als eine Reihe von Zahlen eingeben ,die dann in einer Variablen festgehalten wird. 
Wie...</description>
			<content:encoded><![CDATA[<div>Hallo,<br />
möchte über eine Infrarot Fernbedienung eine Tel Nr. als eine Reihe von Zahlen eingeben ,die dann in einer Variablen festgehalten wird.<br />
Wie gestalte ich nun die Abfrage um mehre hintereinander eingegebene Zahlen in einer Variable zu speichern.<br />
<br />
gruß Nase:(</div>

]]></content:encoded>
			<category domain="http://www.roboternetz.de/community/forums/41-Basic-Programmierung-%28Bascom-Compiler%29">Basic-Programmierung (Bascom-Compiler)</category>
			<dc:creator>nase</dc:creator>
			<guid isPermaLink="true">http://www.roboternetz.de/community/threads/61910-Wert-in-Variable-einlesen</guid>
		</item>
		<item>
			<title>Ansteuerung Leds WS2811 mit ATXMega</title>
			<link>http://www.roboternetz.de/community/threads/61892-Ansteuerung-Leds-WS2811-mit-ATXMega?goto=newpost</link>
			<pubDate>Thu, 09 May 2013 19:08:09 GMT</pubDate>
			<description><![CDATA[Nun, ich dachte mir: machst mal 'nen Crosspost :D 
 
Nachdem ein Mitglied im MCS-Forum die Ansteuerung eines WS2811 über einen NOP-Schlangen-Code...]]></description>
			<content:encoded><![CDATA[<div>Nun, ich dachte mir: machst mal 'nen Crosspost :D<br />
<br />
Nachdem ein Mitglied im MCS-Forum die Ansteuerung eines WS2811 über einen NOP-Schlangen-Code versuchte, dieses nach Unterstützung durchaus erfolgreich, erschien mir der Code doch ein wenig ineffektiv und auch ein bisserl hässlich.<br />
Also hab' ich einen weiteren Code speziell für den ATXMega und dessen Fähigkeiten geschrieben.<br />
<br />
Die Funktionsweise ist dergestalt, dass zwei DMA-Kanäle aus einem Array, welches die Helligkeitseinstellungen der einzelnen Leds enthält, einen Doppelpuffer befüllen und diese zwei Puffer abwechselnd in ein als SPI verwendetes UART schreiben. Die Form der in das UART geschrieben Daten sorgt dann für die Erzeugung der Low/High-Bits am TXD-Pin des ATXMega. Sobald ein Puffer leer-geschrieben ist, übernimmt der zweite, während der erste Puffer wieder über eine ISR befüllt wird. Ein Puffer enthält immer einen Frame aus 24 Bit, dieser wieder besteht aus 3 x 8 Bit, welche die Helligkeit der einzelnen Leds steuern, ledarr(0) = grün, ledarr(1) = rot, ledarr(2) = blau, usw.<br />
<br />
Jedes Bit des Frames ist im Puffer als Nibble (4Bit) abgelegt, daraus ergeben sich die 12 Byte großen Puffer, welche per DMA in's UART befördert werden.<br />
<br />
Der Prozess wird im Hintergrund ausgeführt und verbraucht einen relativ kleinen Teil der vorhandenen Rechenleistung.<br />
Da bei mir kein WS2811-Strip vorhanden ist, jedoch das Mitglied im MCS-Forum das Funktionieren meines Codes bestätigt hat, würd' ich sagen dass es in Ordnung ist, den hier einzustellen.<br />
<br />
Denn brauchen kann den sicherlich irgendwer. ;-)<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">$regfile = &quot;xm128a1def.dat&quot;<br />
$crystal = 32000000<br />
$hwstack = 64<br />
$swstack = 40<br />
$framesize = 40<br />
'$noramclear<br />
'$sim<br />
<br />
Config Osc = Enabled , 32mhzosc = Enabled<br />
Config Sysclock = 32mhz<br />
Config Base = 0<br />
<br />
'### user configurable ###<br />
Const RGBunits = 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' total count of RGB units<br />
Const rstto = 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' reset timeout, 1 equals one empty frame, 24 bits * 1,25µs = 30µs<br />
'### user configurable ###<br />
<br />
Const bytesperRGBunit = 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' every RGB-unit has 3 leds, every led is controlled by 1 byte<br />
Const ledcnt = RGBunits * bytesperRGBunit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' total amount of leds<br />
Const dbfsize = 12&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' one nibble per sent bit, 24 bit per RGB unit, 24 nibbles = 12 bytes<br />
<br />
Const USART_TXEN = 3<br />
Const USART_CMOD0 = 6<br />
Const USART_CMOD1 = 7<br />
Const USART_UCPHA = 1<br />
Const USART_UDORD = 2<br />
Const DMA_CH0TRNIF = 0<br />
Const DMA_CH1TRNIF = 1<br />
<br />
Const SPItmpl = &amp;b10001000<br />
Const SPIhnib = &amp;b01000000&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' SPI_Out_0 = &amp;b1000, 1.25µs/4*1 = H0.312µs, L0.938µs<br />
Const SPIlnib = &amp;b00000100&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' SPI_Out_1 = &amp;b1100, 1.25µs/4*2 = H0.625µs, L0.625µs<br />
<br />
Dim dblbuf_0(dbfsize) As Byte<br />
Dim dblbuf_1(dbfsize) As Byte<br />
Dim ledarr(ledcnt) As Byte&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' ledarr(0) is first led of strip<br />
Dim ledptr As Word&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' points to actual shifted out RGB data<br />
Dim toctr As Byte<br />
<br />
ledptr = 0<br />
ledarr(0) = 128<br />
ledarr(1) = 170<br />
ledarr(2) = 85<br />
ledarr(3) = 1<br />
ledarr(4) = 4<br />
ledarr(5) = 32<br />
<br />
<br />
On Dma_ch0 Dma_ch0_int NOSAVE<br />
On Dma_ch1 Dma_ch1_int NOSAVE<br />
<br />
'UART0 in SPI Mode, TXD --&gt; PD3, XCK --&gt; PD1 (unused)<br />
Config PORTD.3 = Output&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' set SPI TXD to output<br />
USARTD0_BAUDCTRLA = 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' BSEL = (32MHz/(2*3.2MBaud))-1, 1/(1.25µs/4bit) = 3.2MBaud<br />
USARTD0_BAUDCTRLB = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' BSCALE = 0<br />
USARTD0_CTRLA = 0<br />
USARTD0_CTRLB = Bits(USART_TXEN)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' enable transmitter<br />
USARTD0_CTRLC = Bits(USART_CMOD1 , USART_CMOD0)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' enable UART SPI-mode, MSB first, sample rising edge<br />
<br />
Config Dma = Enabled , Doublebuf = CH01 , Cpm = CH0123<br />
<br />
'Trigger Base Value = &amp;H6B + Data register empty (DRE) &amp;H01 --&gt; &amp;H6C<br />
Config Dmach0 = Enabled , Burstlen = 1 , Chanrpt = Enabled , Tci = Lo , Eil = OFF , Singleshot = Enabled , _<br />
Sar = BLOCK , Sam = INC , Dar = NONE , Dam = FIXED , Trigger = &amp;H6C , Btc = dbfsize , Repeat = 0 , Sadr = Varptr(dblbuf_0(0)) , Dadr = Varptr(usartD0_data)<br />
<br />
Config Dmach1 = Enabled , Burstlen = 1 , Chanrpt = Enabled , Tci = Lo , Eil = OFF , Singleshot = Enabled , _<br />
Sar = BLOCK , Sam = INC , Dar = NONE , Dam = FIXED , Trigger = &amp;H6C , Btc = dbfsize , Repeat = 0 , Sadr = Varptr(dblbuf_1(0)) , Dadr = Varptr(usartD0_data)<br />
<br />
Config Priority = Static , Vector = Application , Lo = Enabled , Med = Enabled<br />
Enable Interrupts<br />
<br />
Config PORTE.0 = Output&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' I'm alive led0 on Atmel XPlained ATMega128A1<br />
<br />
Config PORTD.2 = Output<br />
Dim A As Word<br />
Dim C As Word<br />
<br />
Const testspeed = 0<br />
<br />
#IF testspeed = 0<br />
Do<br />
&nbsp; Waitms 500<br />
&nbsp; &nbsp; Toggle PortE.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Loop<br />
#ELSE<br />
Do<br />
&nbsp; Toggle PortD.2<br />
&nbsp; &nbsp; For A = 0 To 65535&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' 91ms for this loop with disabled interrupts (no DMA)<br />
&nbsp; &nbsp; &nbsp; C = A&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ' 108ms with interrupts (with DMA), CPU 84% App &lt;-&gt; 16% ISR/DMA<br />
&nbsp; &nbsp; Next A<br />
Loop<br />
#ENDIF<br />
<br />
End<br />
<br />
Dma_ch0_int:<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !IN&nbsp; &nbsp; &nbsp; &nbsp;  ZL,&nbsp; &nbsp; &nbsp; &nbsp; SREG<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZH<br />
&nbsp; Loadadr dblbuf_0(0) , Z<br />
&nbsp; !RCALL&nbsp; &nbsp; &nbsp; dblbuff<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; ZL,&nbsp; &nbsp; &nbsp; &nbsp; 2^DMA_CH0TRNIF<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; DMA_INTFLAGS, ZL<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZH<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZL<br />
&nbsp; !OUT&nbsp; &nbsp; &nbsp; &nbsp; SREG,&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZL<br />
Return<br />
<br />
Dma_ch1_int:<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !IN&nbsp; &nbsp; &nbsp; &nbsp;  ZL,&nbsp; &nbsp; &nbsp; &nbsp; SREG<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  ZH<br />
&nbsp; Loadadr dblbuf_1(0) , Z<br />
&nbsp; !RCALL&nbsp; &nbsp; &nbsp; dblbuff<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; ZL,&nbsp; &nbsp; &nbsp; &nbsp; 2^DMA_CH1TRNIF<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; DMA_INTFLAGS, ZL<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZH<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZL<br />
&nbsp; !OUT&nbsp; &nbsp; &nbsp; &nbsp; SREG,&nbsp; &nbsp; &nbsp;  ZL<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; ZL<br />
Return<br />
<br />
!dblbuff:<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  r16<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  r24<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  r25<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  XL<br />
&nbsp; !PUSH&nbsp; &nbsp; &nbsp;  XH<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r16,&nbsp; &nbsp; &nbsp; &nbsp; bytesperRGBunit<br />
&nbsp; !LDS&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; {toctr}<br />
&nbsp; !TST&nbsp; &nbsp; &nbsp; &nbsp; r24<br />
&nbsp; !BREQ&nbsp; &nbsp; &nbsp;  filldb<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r16,&nbsp; &nbsp; &nbsp; &nbsp; dbfsize<br />
&nbsp; !CLR&nbsp; &nbsp; &nbsp; &nbsp; r17<br />
!clrdblbuf:<br />
&nbsp; !ST&nbsp; &nbsp; &nbsp; &nbsp;  Z+,&nbsp; &nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !DEC&nbsp; &nbsp; &nbsp; &nbsp; r16<br />
&nbsp; !BRNE&nbsp; &nbsp; &nbsp;  clrdblbuf<br />
&nbsp; !DEC&nbsp; &nbsp; &nbsp; &nbsp; R24<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; {toctr},&nbsp; &nbsp; r24<br />
&nbsp; !RJMP&nbsp; &nbsp; &nbsp;  fillend<br />
!filldb:<br />
&nbsp; Loadadr ledarr(0) , X<br />
&nbsp; !LDS&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; {ledptr}<br />
&nbsp; !LDS&nbsp; &nbsp; &nbsp; &nbsp; r25,&nbsp; &nbsp; &nbsp; &nbsp; {ledptr+1}<br />
&nbsp; !ADD&nbsp; &nbsp; &nbsp; &nbsp; XL,&nbsp; &nbsp; &nbsp; &nbsp;  r24<br />
&nbsp; !ADC&nbsp; &nbsp; &nbsp; &nbsp; XH,&nbsp; &nbsp; &nbsp; &nbsp;  r25<br />
&nbsp; !ADIW&nbsp; &nbsp; &nbsp;  r24,&nbsp; &nbsp; &nbsp; &nbsp; bytesperRGBunit<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; hbyte(ledcnt)<br />
&nbsp; !CPI&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; lbyte(ledcnt)<br />
&nbsp; !CPC&nbsp; &nbsp; &nbsp; &nbsp; r25,&nbsp; &nbsp; &nbsp; &nbsp; r17<br />
&nbsp; !BRCS&nbsp; &nbsp; &nbsp;  avail<br />
&nbsp; !CLR&nbsp; &nbsp; &nbsp; &nbsp; r24<br />
&nbsp; !CLR&nbsp; &nbsp; &nbsp; &nbsp; r25<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; rstto<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; {toctr},&nbsp; &nbsp; r17<br />
!avail:<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; {ledptr},&nbsp;  r24<br />
&nbsp; !STS&nbsp; &nbsp; &nbsp; &nbsp; {ledptr+1}, r25<br />
!byteloop:<br />
&nbsp; !LD&nbsp; &nbsp; &nbsp; &nbsp;  r24,&nbsp; &nbsp; &nbsp; &nbsp; X+<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; SPItmpl<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 7<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 6<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 6<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
&nbsp; !ST&nbsp; &nbsp; &nbsp; &nbsp;  Z+,&nbsp; &nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; SPItmpl<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 5<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 6<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 4<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
&nbsp; !ST&nbsp; &nbsp; &nbsp; &nbsp;  Z+,&nbsp; &nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; SPItmpl<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 3<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 6<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
&nbsp; !ST&nbsp; &nbsp; &nbsp; &nbsp;  Z+,&nbsp; &nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !LDI&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; SPItmpl<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 1<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 6<br />
&nbsp; !BST&nbsp; &nbsp; &nbsp; &nbsp; r24,&nbsp; &nbsp; &nbsp; &nbsp; 0<br />
&nbsp; !BLD&nbsp; &nbsp; &nbsp; &nbsp; r17,&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
&nbsp; !ST&nbsp; &nbsp; &nbsp; &nbsp;  Z+,&nbsp; &nbsp; &nbsp; &nbsp;  r17<br />
&nbsp; !DEC&nbsp; &nbsp; &nbsp; &nbsp; r16<br />
&nbsp; !BRNE&nbsp; &nbsp; &nbsp;  byteloop<br />
!fillend:<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; XH<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; XL<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; r25<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; r24<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; r17<br />
&nbsp; !POP&nbsp; &nbsp; &nbsp; &nbsp; r16<br />
Return</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.roboternetz.de/community/forums/41-Basic-Programmierung-%28Bascom-Compiler%29">Basic-Programmierung (Bascom-Compiler)</category>
			<dc:creator>MagicWSmoke</dc:creator>
			<guid isPermaLink="true">http://www.roboternetz.de/community/threads/61892-Ansteuerung-Leds-WS2811-mit-ATXMega</guid>
		</item>
		<item>
			<title>ATMega88 über FT232R programmieren</title>
			<link>http://www.roboternetz.de/community/threads/61871-ATMega88-%C3%BCber-FT232R-programmieren?goto=newpost</link>
			<pubDate>Tue, 07 May 2013 20:23:35 GMT</pubDate>
			<description>Hey Forum! 
 
Habe gestern versucht, mit Bascom AVR den AT88 über den FT232R zu  
programmieren. Der FT232R ist per VCP-Treiber eingebunden. ...</description>
			<content:encoded><![CDATA[<div>Hey Forum!<br />
<br />
Habe gestern versucht, mit Bascom AVR den AT88 über den FT232R zu <br />
programmieren. Der FT232R ist per VCP-Treiber eingebunden. <br />
MCS-Bootloader ist auf dem AT88 vorhanden. Verbunden sind der Atmel und <br />
dar FT232R an Masse, RXD und TXD.<br />
<br />
Zunächst folgende Fehlermeldung:<br />
&quot;Open COM2<br />
Sending Init byte<br />
Loader returned : 123<br />
Uploading...<br />
Error : -6008<br />
Finish code : -6008&quot;<br />
<br />
Der MCS-Bootloader scheint zu funktionieren, da der Loader die &quot;123&quot; <br />
zurückgibt. Nun aber aber funktioniert der Atmel nicht mehr wie er <br />
sollte, zeigt nur noch Unsinn an. Weiter Versuche schlugen fehl.<br />
<br />
Ich hab von dem Ganzen nicht allzuviel Ahnung.<br />
Warscheinlich irgendein unsinniger Fehler?<br />
Lag der Fehler darin, den Atmel mit dem FT232R programmieren zu wollen?<br />
<br />
Grüße und vielen vielen Dank für eure Hilfe!<br />
Benedikt</div>

]]></content:encoded>
			<category domain="http://www.roboternetz.de/community/forums/41-Basic-Programmierung-%28Bascom-Compiler%29">Basic-Programmierung (Bascom-Compiler)</category>
			<dc:creator>Benedikt Zimmermann</dc:creator>
			<guid isPermaLink="true">http://www.roboternetz.de/community/threads/61871-ATMega88-%C3%BCber-FT232R-programmieren</guid>
		</item>
		<item>
			<title>Array an Funktion übergeben</title>
			<link>http://www.roboternetz.de/community/threads/61834-Array-an-Funktion-%C3%BCbergeben?goto=newpost</link>
			<pubDate>Thu, 02 May 2013 17:14:59 GMT</pubDate>
			<description>Hi, 
 
ich möchte einen String nach bestimmten Zeichen durchsuchen. Da ich aber wenig Zeit dafür verwenden kann / darf, möchte ich mir selbst eine...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
ich möchte einen String nach bestimmten Zeichen durchsuchen. Da ich aber wenig Zeit dafür verwenden kann / darf, möchte ich mir selbst eine Funktion schreiben. Dazu lege ich ein Byte-Array als Overlay über einen String, bis hierhin ja noch kein Problem. Jetzt brauche ich eine Funktion, die mir die Position dieses Zeichens als Byte zurückgibt, das hab ich auch schon:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Function Searchstring(byval Strar As Byte , Byval Strsearch As Byte) As Byte<br />
<br />
&nbsp;  Local I As Byte<br />
<br />
&nbsp;  Searchstring = 0<br />
<br />
&nbsp;  For I = 1 To 255 Step 1<br />
&nbsp; &nbsp; &nbsp; If Strar(i) = 10 Then&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  'Lf<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Exit For<br />
&nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; If Strar(i) = Strsearch Then<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Searchstring = I<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Exit For<br />
&nbsp; &nbsp; &nbsp; End If<br />
&nbsp;  Next I<br />
<br />
<br />
End Function</code><hr />
</div>Der Code ist noch nicht optimiert, aber das mache ich erst, wenns funktioniert. Das Problem ist, wenn ich die Funktion aufrufe:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp;  Tmp = Searchstring(gps_ovl(1) , 58)</code><hr />
</div>arbeitet er nur mit dem ersten Byte des Arrays, weils eben übergeben wurde. Ich möchte aber das ganze Array übergeben. Wie geht das? Bzw. geht das in Bascom überhaupt?<br />
Ich hab schon dran gedacht, die Speicheradresse des ersten Bytes zu übergeben und dann immer zu inkrementieren, aber die Lösung gefällt mir nicht so gut... <br />
Byref kann ich fürs Array nicht nutzen, da ich dann für jeden String eine eigene Funktion bräuchte und das zuviel Platz verbrauchen würde, den ich nicht habe.<br />
Ich hoffe ihr versteht mein Problem und jemand kann mir helfen?! :D<br />
<br />
Vielen Dank &amp; Gruß<br />
Chris</div>

]]></content:encoded>
			<category domain="http://www.roboternetz.de/community/forums/41-Basic-Programmierung-%28Bascom-Compiler%29">Basic-Programmierung (Bascom-Compiler)</category>
			<dc:creator>Che Guevara</dc:creator>
			<guid isPermaLink="true">http://www.roboternetz.de/community/threads/61834-Array-an-Funktion-%C3%BCbergeben</guid>
		</item>
	</channel>
</rss>
