on Coding, Electronics, Microcontrollers

yet another seven segment display code generator/calculator

Yesterday I made a post regarding a seven segment display code generator, One of our reader Zafer shared his work with us through the comments section. Its a nice and useful utility. Its in Turkish language but its easy to use. Download it here  from Dropbox.

Hi Muhammad
I follow your site with interest.
I’ve prepared the following program. hopefully be useful.
Zafer
http://yadi.sk/d/0PqFkSf2P9gJr

 

 

Seven segment Display code generator / calculator

I found this awesome code generator for seven segments. There are many out there but this one has some good features. first of all you can decide which Segment is attached to which pin  [all pins should be on one port].  secondly you can get values for multiple characters and the code generator will make an array of values for you .

Give it a try. It can be downloaded here  or from codeplex website.

Capture

 

“COM Port Physical Interface Model” COMPIM from PROTEUS

I found an interesting feature from Proteus, so-called COMPIM serial port model. The Virtual System Modeling capabilities of Proteus VSM allow the creation of models that can actually interact with the physical world. Such models are called Physical Interface Models or PIMs for short.

The COMPIM model is a Physical Interface Model of a serial port. Incoming serial data is buffered and presented to the circuit as a digital signal, whilst serial digital data generated by a CPU or UART model appears at the PC’s physical COM port. The physical COM part also includes virtual COM port over USB and Bluetooth with some work-around. The COMPIM model also provides for baud rate translation, and for optional hardware or software handshaking on both the physical and virtual sides of the device.

This allows any real world hardware equipped with a serial port to interact with a Proteus VSM simulation. For example, you could use it to develop a program for a microprocessor within Proteus VSM that would operate a real physical modem, perhaps as part of a security or home automation system. By default, the COMPIM supports 4 physical ports.

 

writing and reading from AVR EEPROM in Block.

EEPROM can be used to store non volatile data of the program , sometimes you need to write arrays even multidimensional. The way I do it is by using EEMEM attribute. EMMEM is used to allocate space in EEPROM.

I use the Macros given below to write or read to EEPROM. you have to use #include I would be precise . below is the Code.

#include

//////////////////////////////////////////////////////////////////////////
//        Macros and # Defines
//write block to EEPROM
#define eepw(message,EEADDR,BLKSIZE) eeprom_write_block((const void*)message,(void*)EEADDR,BLKSIZE);
//read block from EEPROM
#define eepr(readblck,EEADDR,BLKSIZE) eeprom_read_block((void*)readblck,(const void*)EEADDR,BLKSIZE);

uint8_t EEMEM eepstring[15];

Example use

eepw("sample test 1",eestring, 15);  // "writes sample test1" to eestring in EEprom ,
char d[15];   //array in ram
eeprom_read(d, eestring[0],15); // reads the data and puts it in d[]

 

How to filter logcat in Android Studio?

In logcat of Android Studio there is usually too much output, sometimes a developer would want to filter out these results so that he only gets logs from the application he is debugging. This can be achieved by the following method.
On the left side (right next to the tabs) is an icon with green arrows – it can be toggled on/off to display only logcat from the process selected in the list 🙂

aJJJa

UPDATE:
as of android studio ver 0.4.5 u will get messages from the app that is running only by default. Log cat has a new option (ON by default) which creates an application filter automatically such that only the launched application’s output is shown
 

 

Configuring Power Rails in Proteus ISIS

Proteus ISIS is a nice and powerful simulation tool for electronic designs. For most ICs the supply pins are hidden and they are connected to the 5v power rail by default. Some times one need to use other than 5V value for the supply and i have seen many people don’t know how to do it. In this short post I would show how you can change the value but first if just want to connect the 5V supply to other devices.

In case you don’t want to change the supply voltage and just want to connect it to other devices its fairly simple. Follow the steps

  • Select “Terminals mode” from the left toolbar
  • from the terminals list you can select “Power” or “Ground” and place on the schematic. Power and ground are the power rails that are connected to the hidden pins
  • That’s it, check the images bellow.

This is how it would appear on the schematic.

Changing the Power Rails Volatge

So if you want to use other than 5V power supply you can configure it from the “Design>>Configure Power rails” menu entry. Proteus would give you a dialogue box if you followed this menu from where you can change the value for VCC/VDD and VEE . Just type in the required value and hit OK.

that would lead to the final step.

cheers!

 

Routing Diferential traces in Cadsoft Eagle

Eagle supports basic differential routing. To make a pair of traces a differential  pair, both signals should have the same name with _N and _P at the end. For example `MIC_N` and `MIC_P`. When you try to route this signal it will be seen as a differential  pair and will be routed as one. This means that both the traces will be routed at the same time as shown in the image above. Wen one of the two traces is selected both will be routed at the same time. To route only one trace, click on the trace to route it and when both traces are selected press escape to only route the one you selected.

 

a collection of firmwares app notes and guides for simcom

SIMCOM– Firmwares

THIS POST IS NO MORE UPDATED… CHECK THIS UP TO DATE POST

Here I am trying to make a collection of firmwares and release notes for Simcom Sim900 and other Simcom GSM/GPRS modules

SIM900


…