Configurando teclado abnt2 multimídia no linux

Para quem tem um teclado multimídia que simplesmente se nega a funcionar corretamente no linux, independente da configuração que você seleciona no KDE (meu caso), ou ainda se seu teclado parou de funcionar de repente após um upgrade, e não há nada que o faça funcionar de volta, aqui vai a dica…

Abra um terminal, e digite o seguinte comando:

setxkbmap -keycodes “xfree86(abnt2)+aliases(qwerty)” -model microsoftpro -layout br -variant abnt2

Pronto. Verifique agora se as teclas voltaram a funcionar!

Caso positivo, certifique-se de que as novas configurações sobrevivem a um reinício do X. Se tudo voltou a dar errado, inclua este comando na inicialização automática do seu ambiente. No caso do KDE, experimente criar um novo arquivo texto dentro do diretorio ~/.kde/Autostart/ com o nome que desejar, digitando, por exemplo:

nano ~/.kde/Autostart/startup.sh

A seguir, copie e cole o seguinte texto para dentro do arquivo:

#!/bin/bash
###########
setxkbmap -keycodes “xfree86(abnt2)+aliases(qwerty)” -model microsoftpro -layout br -variant abnt2

Agora feche o arquivo com Ctrl+X e selecione S para salvar as modificações no arquivo. Em seguida, marque o arquivo recém-criado como executável, através do comando:

chmod +x ~/.kde/Autostart/startup.sh

Pronto! Agora reinicie o KDE para ver se as configurações surtiram efeito.
PS: Talvez você precise estar logado como root para executar alguns desses comandos.

Note to self: Never buy anything from LG again

20760


For the rest of my life I’m sticking with Pioneer. This ain’t the first and probably wont be the last optical drive from LG that gives me headaches in less than one year after I bought it. Apparently, this drive chokes reading some burned DVDs, even DVDs burned by itself, while other computers could read them without a hitch.

The internet is full of complaints for this drive, the GSA-H22N, and I remember well the experience I had working in a school full of computers with LG drives in the past also wasn’t exactly the most troubleless ever.

But the world is weird, isn’t it? Turns out the best writable CD media I’ve ever bought in my life was also branded by LG. For years I’ve used this media with my Pioneer 110D, the most fast, reliable, cool and affordable DVD±R burner I have ever bought.

Configuring WinPic800

WinPic800 is a free (as in beer) PIC programmer software compatible with the Tait-style of hardware programmers. In addition, it is also compatible with the programmer I detailed in my last post.

However, due to the variety of styles and designs of the same programmer out in the web, one has to carefully configure soft programmers so they can talk with a hardware device. To configure WinPic800 to work with the parallel schmitt trigger programmer, please follow this instructions:

  • Download the latest version of WinPic800
  • Download the hardware definition file for this device
  • Locate the directory where you installed WinPic800
  • Put the downloaded .hwp file inside the Hardware folder
  • Open WinPic800, go to Devices > Settings > Hardware
  • Select the Tait Schmitt device entry and click OK

Now you may plug the hardware on the parallel port, insert a PIC on the programmer, turn it on and then click on Device > Detect Device. The name of the microcontroller on the programmers socket should be shown on screen.

Componentes eletrônicos grátis!

D1290-Free-Beer-Posters


Sabia que a maioria das empresas fabricantes de componentes eletrônicos disponibiliza amostras grátis de seus produtos ao mundo inteiro, incluindo ao Brasil? Gratuitas mesmo, pagam tudo, os componentes, os impostos e todo o frete até sua casa.

Alguns dos fabricantes que disponbilizam este recurso e que entregam no Brasil são a Intersil, Analog Devices, Linear Technology, National Semiconductors e a Maxim. A Maxim, no entanto, cobra o valor do sedex do escritório deles em São Paulo até sua casa. O restante é por conta deles, o que não é um mau negócio, já que os componentes da Maxim são bastante difíceis de se encontrar no Brasil, principalmente sua linha de conversores DC-DC, que podem chegar a preços ridiculosamente altos, inviabilizando qualquer projeto de garagem.

Para conseguir as amostras, no entanto, é preciso falar a verdade; você terá mais chances de receber seu pedido em casa se informar a empresa onde trabalha (caso possa pedir em nome dela), a universidade onde estuda (caso seja estudante) ou indicar se é apenas hobbista na área. É interessante dar detalhes sobre seu projeto também, pois os fabricantes não são bobos para dar componentes de graça para qualquer um. A esperança deles é que seu protótipo um dia alcance a linha de produção e aí sim eles possam faturar horrores vendendo grandes lotes de componentes para a fábrica que decidir produzir seu projeto.

Ah, e para quem gostou do assunto, além de componentes eletrônicos, há muito mais coisas disponíveis de graça que podem ser solicitadas via internet por aí. Sites e blogs interessantes se destinam unicamente a divulgar este tipo de novidade, como o AmostrasGratis.org, e o Freebies Blog. O Google, nessa hora, também é seu amigo.

Battery-Powered Parallel PIC Programmer

744px-Microchip_logo.svg_

For those who don’t know, PICs are essentialy tiny computers, with built-in internal memory, processor, input/output controllers, comparators and other peripherals packaged inside a single silicon chip.

744px-Microchip_logo.svg Last year, on the Microsoft Academic Cell for Robotics of the Federal University of São Carlos, I needed something to introduce our members to the eletronics world. So we decided to begin by using Microchip‘s PICmicro microcontrollers to build simple but functional circuits, a nice way to gather knowledge ranging from basic analog electronics to low-level microcontroller programming in the same time, while also having some fun.

But then, we needed a programmer. Not the person, but the hardware required to store a software program inside the microcontroller in order to instruct it into doing something useful, thus effectively programming the device.

After spending some time googling around for custom-built programmers, and after seeing they were quite simple to design, we decided to build or own as a good starting exercise. We just needed something simple, reliable, that wasn’t too expensive and that could be easily built by students.

 

Requirements

    To keep the budget factor low, we decided on a David Tait‘s design which uses the computer parallel port and a parallel cable as a transmission line. Before designing the device, there were some initial modifications we decided to have in our circuit:

    BH4AA-PCIt would run entirely on batteries. Having a separate power supply for the programmer is just asking for more wires around and having more wires around usually equals having more mess on the work desk. Also adding to the fact that power supplies here aren’t so cheap for a student budget, creating a self-powered device was the most suitable option for us.

    But since we wanted something simple and cheap, but still reliable and expensible, some extra care was needed, because, if power supplies weren’t cheap, good batteries aren’t either. Efficiency should be a main goal, because if we had to replace batteries everytime, then the savings on the power supply wouldn’t justify the increased cost in the long run.

     

The Design

    To improve efficiency, our circuit uses a schmitt trigger buffer for translating parallel port voltages into TTL-compatible voltages. Also, the proper use of transmission line terminations allows the device to work with longer parallel cables. Actually, I have been using 2m cables myself and didn’t run into any issues yet.

    296-TO92-3, TO-226AA To regulate the unpredictable alkaline voltages down to a nice constant 5v, we also couldn’t rely on a standard linear regulator like the 7805 because it requires at least 7.5v to work properly. In other words, using it would require at least 5 cells with at least 90% of charge left available in our circuit. Too wasteful. In turn, a LDO regulator would be fantastic, as it works with voltages as low as 5.4 volts.

    Just for clarification, I couldn’t just plug 4 or 3 cells in series because newly replaced alkaline batteries can source voltages as high as 1.68v per cell rather than they nominal 1.5v, resulting in almost 7v of microcontroller killing voltage. Also, 9v batteries were avoided for their low mAh capacity, as the device should be able to power-up other circuits trough its ICSP connections during programming.

     

    To enter programming mode, most PICs needs a voltage source somewhere around 12v present on the MCLR pin. In the past, however, a real current source was required for EEPROM programming, but for the newer, flash-memory based chips, the current doesn’t actually matters, only the voltage does, as it only purpose is to signal the device to enter programming mode.

    Because of the very experimental nature of this project, we sacrified the ability to program EEPROM chips and aimed only for the flash-memory chips (it may work with EEPROMs, but we just haven’t tested it yet). So, if we need a voltage that is almost the triple of our available voltage, but don’t need any actual current, its the perfect scenario for employing a charge pump circuit.

    voltagedoubler Charge pumps are very efficient voltage converters, but with very finite impedance, they can’t source much current. Those circuits use capacitors a "buckets" to pump charge from one place to another, producing higher voltages at the expense of lower output currents. It didn’t take long before we noticed that Intersil offers free samples of their 7660S "Super voltage converter chips", which is great, although the 7660 family is very popular and available from several manufacturers all around the world.

    Nevertheless, we went on and asked Intersil for some of the 7660 samples.

     

Schematic

    All considerations taken into account, below is the final schematic for the device, featuring the LP2950-CZ LDO regulator and the ICL7660 in the "voltage tripler" configuration.

     

    Battery-Powered Parallel PIC Programmer (sch)

 

Parts list

    Qty Device (Description) Value Parts
    1 Power Switch DIP Switch SW1
    1 LED5MM Green LED1
    1 LED5MM Red LED2
    6 Small Signal Diode 1N4148 D1, D2, D3, D4, D5, D6
    1 Resistor (0.25w) 270 R17
    2 Resistor (0.25w) 100 R14, R15
    2 Resistor (0.25w) 1k R1, R11
    4 Resistor (0.25w) 4k7 R3, R4, R5, R8
    9 Resistor (0.25w) 10k R2, R6, R7, R9, R10, R12, R13, R16, R18
    3 Ceramic Capacitor 100nF C3, C8, C11
    2 Ceramic Capacitor 470pF C9, C10
    2 Eletrolytic Capacitor 1uF C1, C2
    4 Eletrolytic Capacitor 10uF C4, C5, C6, C7
    2 Transistor PNP BC557C T1, T2
    1 Transistor NPN BC548 T3
    1 Voltage Converter ICL7660CPA IC3
    1 Schmitt Trigger Inverter 74HC14N IC5
    1 LDO Voltage Regulator LP2950CZ-5.0 IC1
    1 SIL Pin Header 3-way J2
    1 SIL Pin Header 3-way J1
    1 SIL Socket 20-way J3
    1 DIL Socket 18-way DIL18
    1 DIL Socket 20-way DIL20
    1 Serial Connector DB9 Female DB9
    1 Parallel Connector DB25 Female DB25
    1 Battery Clip 4xAA Cell Holder  

 

Building

    The samples from Intersil arrived only a few weeks later, carefully packed inside a hard plastic box filled with foam, ensuring the chips had some comfort during their long travel overseas.

    Well, that box was really too useful to be discarded, so we figured out a nicer destiny for them. At the time I didn’t yet have my fellow Dremel rotary tool, so I just cut its top off with a knife and made some holes on the sides for screwing a DB-25 connector (for the parallel port) and a DB-9 connector (for the ICSP connections). Here are the final pictures of the programmer mounted inside the Intersil’s sample’s box (sorry for the crappy resolution):

 

Layout

    And finally, here is the perfboard (pre-punched circuit board) layout we used for placing components on the box. Please note this layout should not be used for PCBs.

    Battery-Powered Parallel PIC Programmer (brd)

Downloads

    All Eagle files can be obtained here. For more information on how to setup a software programmer to work with this hardware, please see the next post, configuring WinPic800.

 

 

The Microchip name and logo is a registered trademark of Microchip Technology Incorporated in the U.S.A. and other countries. The schematic presented here is copyright of its original author, licensed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.