blog.world3.net

RDP connection shortcut

12/05/2012 – 10:44

Create a shortcut with the target “%windir%\system32\mstsc.exe <connection.rdp>”. You can then pin it to the start menu or task bar for one click access.

By mojo | Posted in windows | Comments (0)

Japanese keyboard fix

10/05/2012 – 23:35

To fix the Japanese keyboard mapping on various laptops change the driver for the keyboard as well as the keyboard layout selection.

By mojo | Posted in windows | Comments (0)

Working XMEGA temperature sensor code

17/04/2012 – 09:00
int16_t ref, degrees_x10;
 float kelvin_per_adc_x10;
ADCA.CTRLA = ADC_FLUSH_bm; // cancel any pending conversions, disable ADC
// set up exactly how Atmel did when they measured the calibration value
 ADCA.CTRLB = ADC_RESOLUTION_12BIT_gc; // unsigned conversion, produces result in range 0-2048
 ADCA.REFCTRL = ADC_REFSEL_INT1V_gc | ADC_TEMPREF_bm;
 ADCA.PRESCALER = ADC_PRESCALER_DIV512_gc;
ADCA.CH0.CTRL = ADC_CH_INPUTMODE_INTERNAL_gc | ADC_CH_GAIN_1X_gc;
 ADCA.CH0.MUXCTRL = ADC_CH_MUXINT_TEMP_gc;
ADCA.CTRLA |= ADC_ENABLE_bm;
 adc_wait_8mhz();
// get 358 K factory calibrated value
 ref = HW_read_signature_byte(PROD_SIGNATURES_START + TEMPSENSE0);
 ref += HW_read_signature_byte(PROD_SIGNATURES_START + TEMPSENSE1) << 8;
 kelvin_per_adc_x10 = ((273 + 85)*10) / (float)ref; // reference is ADC reading at 85C, scaled by 10 to get units of 0.1C
degrees_x10 = ADC_sample(&ADCA.CH0);
 ADCA.CTRLA = 0; // turn ADC off
 ADCA.REFCTRL = 0; // turn temperature sensor off
degrees_x10 *= kelvin_per_adc_x10;
degrees_x10 -= 2730;
return (degrees_x10);
By mojo | Posted in avr | Comments (0)

HP Microserver early impressions

09/04/2012 – 22:26

The HP Microserver has been well reviewed on many sites, including Silent PC Review. Unfortunately it doesn’t live up to the hype, as many other people have discovered (check the SPCR and AVForums forums).

The fans are loud. HP claim 22dB, but my basic meter rated the Microserver at 48dB from 1m. I swapped the 120mm fan for a quieter one which reduced it down to an acceptable level, but even so the PSU fan is far too loud to use as a media centre. Definitely the sort of thing you need to keep out of the living room and bedroom.

The PSU is also far less efficient than the review models. SPCR measured an idle power consumption of 25W with two hard drives. As shipping the Microserver comes with one 250GB HDD and idles at 52W. More than twice what the review samples used. This is a common trick – send review sites units with special high efficiency components but ship much cheaper parts to consumers. I confirmed that the PSU is at fault by trying a more efficient one which did manage to reach 27W at idle.

Other than these two serious issues the server is a very nice bit of kit. The CPU seems reasonably powerful, a bit quicker than my older Atom D510 despite that CPU having hyperthreading. Plenty of room for HDDs (you can actually have 6 if you use the 3.5″ bay and the external SATA) and fairly easy to work on. Seems solidly built. The unusual torx screw heads are a bit annoying and the multi-SATA cable is difficult to remove (necessary to slide the mobo out for RAM upgrades and the like). The GPU is powerful enough to do transcoding on the fly for DLNA. Some people have commented that the lack of a HDMI port makes it less useful as a media centre, but it is far too loud for that anyway.

The on-board network chip is a Broadcom NetXtream. It isn’t particularly good, strange for a machine basically built to serve files over a network. I can pull 60MB/sec over it, although CPU load is a bit high. There is no jumbo frame support, which isn’t as bad as it sounds because interrupt moderation makes it less important these days, but still… This is a budget chip. PCI-Express NICs are pretty cheap, but will of course add to the power consumption.

The BIOS is really basic. There is no fan speed control. Very little in the way of configurability for SATA operation, boot order and the like. The minimum shared memory for graphics is 32MB. The BIOS won’t boot with slow fans. SPCR says the cut-off is around 500 RPM, but I couldn’t go any lower than about 900 RPM.

Overall I’d say it’s a good product, if you are willing to accept the noise and either pay the higher electricity bills or shell out for a PicoPSU. As ever HP managed to take a good idea and almost ruin it.

By mojo | Posted in hardware | Comments (0)

Possible fix for XBMC buffering issue

02/04/2012 – 22:00

Since day one I have had an issue with XMBC on Windows where it would occasionally need to buffer videos. I thought it was network related but there is no bandwidth problem and changing network card didn’t help. There was no problem with CPU usage either. Most bizarrely the problem would go away if I altered the audio settings, e.g. by setting or clearing the “output stereo to all speakers” option. It didn’t matter what the actual settings were, they just had to be changed once per video. Even after starting and stopping the video it would stay fixed.

Today I switched from using the Radeon 3200 based on-board graphics to a discrete Radeon 5300 card and the problem seems to have gone. It must be something about the HDMI sound output or otherwise related to the card. Very odd.

By mojo | Posted in windows | Comments (0)

40p tax rate ≠ rich people paying more tax

24/03/2012 – 20:55

The idea being scrapping the 50p tax rate is that somehow it will make rich people pay more tax. That doesn’t seem to make sense. When the rate goes down will people paying the higher rate ask their accountants to stop dodging tax and decide that it’s now okay to pay more?

Ah! But we are closing all the loop holes too, they say. Okay, close them, and keep the rate at 50p as well. Just… fucking tax the bastards.

Sorry, that was uncalled for. They are not all bastards. I’m really upset with the betrayal.  You expect the Torys to be dicks, but the Lib Dems made me vote for them. To be fair I don’t think Charles Kennedy would have ever shacked up with Cameron, and I never voted for Clegg (admittedly due to tactical voting, but still my hands are relatively unsoiled).

By mojo | Posted in politics | Comments (0)

RFM12B reception

19/03/2012 – 15:28

Been debugging some RFM12B code again today. Reception is not as simple a matter as it could be because the documentation doesn’t really explain how it is supposed to work. I will try to make up for that in this post.

  1. Turn on receiver
  2. Wait for IRQ to indicate data available
  3. While RSSI bit in status word is set keep reading data as IRQ indicates it is coming in
  4. Reset FIFO

The example code in the datasheet looks for an end-of-packet marker in step 3, which is also a workable option but has the disadvantage that the packet marker can never appear anywhere else in the packet. If your packets contain arbitrary data it’s possible an end-of-packet sequence like 0xAA55AA55 might appear in them, making those particular ones impossible to transmit. Instead I look for RSSI dropping and then decode what I have in the buffer independently of exactly how many bytes were received.

Step 4 is also rather critical. Without it you will keep getting IRQs signalling new data in the FIFO. The RFM12B picks up the preamble bytes which start the FIFO filling but does not seem to have any mechanism for stopping it again. You have to send the reset commands given in the datasheet or it will just keep receiving crap, even once RSSI disappears and it should be obvious that no new valid data is going to arrive.

By mojo | Posted in avr, electronics | Comments (0)

CCITT CRC for AVR in C

06/03/2012 – 09:35

AVG libc comes with some handy CCITT CRC code, but I had trouble matching it to standard C implementations. Antov on AVR Freaks delivered:

unsigned char a,b,c,d; 
a = (unsigned char)((crc & 0x00FF) ^ data); 
b = (unsigned char)((a << 4) ^ a); 
c = (unsigned char)((b << 3) ^ (crc >> 8) ^ ((b & 0xFF) >> 4)); 
d = (unsigned char)(b ^ ((b & 0xFF) >> 5)); 
crc = (unsigned int)(((unsigned int)d << 8)|(c & 0xFF));
By mojo | Posted in avr | Comments (0)

AVR bootloader linking

20/02/2012 – 11:19

To link an AVR bootloader add this to the linker command line:

-Wl,--section-start=.text=$(BOOT_START),-e,boot,--defsym,zero_addr=0 -nostdlib

From http://old.nabble.com/Relocate-Data-into-bootloader-Section-td28511592.html

By mojo | Posted in avr | Comments (0)

XMEGA USART unsets output direction on ports when disabling TX

02/02/2012 – 15:23

I noticed that if I set the TX pin of a port to output and then enable the USART it works. If I then disable the TXEN bit (necessary because with IR comms the TX line has to be held low during reception, otherwise the transceiver blinds itself) the TX port pin is reset to being an input. Unless you set it back to being an output the USART will be unable to send any more data when you re-enabled TXEN.

By mojo | Posted in avr | Comments (0)
Page 1 of 1912345...10...»Last »
たとえ溺れても梦はゆめでしかない
  •  

    May 2012
    M T W T F S S
    « Apr    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Categories

    • audio (1)
    • avr (24)
    • BBC (1)
    • electronics (30)
    • genius (4)
    • hardware (23)
    • idiots (39)
    • Internet (21)
    • law (20)
    • microcontrollers (12)
    • networking (17)
    • politics (30)
    • privacy (19)
    • Retro Adapter (5)
    • security (17)
    • software (32)
    • Uncategorized (18)
    • windows (28)
  • Archives

    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • March 2011
    • January 2011
    • December 2010
    • November 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • November 2005
  • Links:

    Main site: world3.net

    Electronics: denki.world3.net

WordPress | Sandbox