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


… 

 

Disable PIN code using Gsm modem AT commands

If you have a PIN code enabled SIM card and want to remove /disable PIN code using AT commands follow these commands,
suppose 9546 is the current PIN code , Replace 9546 with your PIN code, >>> shows the response from modem.

AT+CPIN?
>>> +CPIN: SIM PIN // pin codes need to be entered
>>> OK

AT+CPIN="9546"
>>>; OK

AT+CLCK="SC",0,"9546" // disable pin code
>>> OK

AT+CPIN?
>>> +CPIN: READY

 

 

GSM Modem/Module not responding to AT commands after firmware Upgrade??

I get a lot of queries about this issue, so I thought I should write a small post about it. For example the latest one was

Hello Muhammad,
I recently update SIM900 to firmware 1137B12SIM900M64_ST.cla using “Simcom – sim900 Customer flash loader V1.01″ at the baud rate 1498000. Everything went perfectly like but after I restart the module I get “þIIIIþþþ” response from SIM900 at 115200 baud rate, I could not get any AT commands working. Kindly do help me.

Some modems support AutoBaud by default. Auto Baud feature allows the modem to be used with any baud rate, and for this to be used the Modem waits for a input string “ATr” it uses this string to detect the baud rate being used. As the manual describes the modem when in Auto Baud will be looking for this string after it is powered and this should be in CAPS otherwise modem wont be able to detect the correct baud rate. Sim900 has the auto baud by default. Some modems don not support Auto Baud so for these modems after the firmware has been updated, you should use the default baud rate, 9600 and 115200 are the most common.

if you want to fix or change the baud rate you should use the AT+IPR command. For example if you need to fix it to 4800.

 AT+IPR=4800r
 

“The IC Time Machine”

What is it?

“A highly stable controller capable of producing accurate time delays, or oscillation.”
-Philips Components and Semiconductors

The 555 is a 8-pin intergrated circuit with 2 modes of opperation. The time delay (stable) mode is controlled by one capacitor and one resistor. The oscillation (astable) mode is controlled by a capacitor and two resistors. There is also a third mode Bistable mode or Schmitt trigger  : the 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. This post will focus on some of the basics of 555 ic.

Navigation

1. 555 ic introduction

2. Pin configuration

3. Operation modes

4. Component  selection

5. Specifications for NE555

6. Derivatives

7. Resources

… 

 

Keeping track of time in embedded applications: millis();

Its very handy to keep track of time in embedded programs. In this post I will implement a function called millis() which can be used to track time.  Arduino users will be familiar with this one. I would be doing it for AVR MCUs you can easily port it for others. this function returns the number of milliseconds since the MCU began running the current program. This number will overflow (go back to zero), after approximately 50 days.
It uses a hardware timer , in this post i will use timer0 . The first step is to initialize timer0 and interupts. lets start.

void timer0(){
  // To set clock:
  // 1MHZ is 1,000,000 ticks per second
  // 1000 milli in 1 second
  // xMHZ = 1000millis
  // so MHZ/millis gives # HZ per millis
  // (HZ/millis)/prescaler= Top counter number

  // EG:for 8MHZ clock
  // 8000000/1000
  // 8000.0000000000
  // 8000/256
  // 31.2500000000 TOP counter

  //set CTC (clear timer on compare match mode)
  TCCR0A = (1< <WGM01);
  //sets prescaler clkIO/256  ***THIS MIGHT CAUSE ISSUES SETS FOR ALL CLOCKS**!!!!
  TCCR0B = (1<<CS02);
  //sets interrupt enable for OCF0A (TIMER_COMPA_vect)
  TIMSK0 = (1<<OCIE0A);
  //sets TOP counter match A at 31
  OCR0A = 31;
}


volatile uint32_t millis()
{
 uint32_t mill;
 uint8_t oldSREG = SREG;
 // remember last value of interrupts
 // disable interrupts while we read timer0_millis or we might get an
 // inconsistent value (e.g. in the middle of a write to timer0_millis)
 cli();
 mill = millis_count;
 SREG = oldSREG; // rewrite reg value to turn back on interrupts
 return mill;
}

In the code shown above we have initialized timer/counter 0 to make an interrupt after every millisecond. Next we have to update our millisecond count.

//interrupt declaration
ISR(TIMER0_COMPA_vect)
{
  ++millis_count;
  //OCR0A = 10; //sets upper breakpoint A
}

That’s it. Lets see how to use it! First we copy the current value in milis() to a variable.

uint32_t starttime=millis();

and later we compare the new values with the start value. Here’s an example of a 25 second.

if(millis()-starttime > 25000)
{
  // some code here
}

Note that the parameter for millis() is an unsigned long, errors may be generated if a programmer tries to do math with other datatypes such as ints.

There are a number of ways you can use this. Hope this post will help you

 

Disable CLK Pre-scaler in AVR to use 8MHz Internal Oscilator

Just wanted to share this small piece of information that can help many . If you want to Run your AVR at 8MHz from the internal oscillator you need to disable the CLK/8 Fuse. You can do this by burning new fuse values. This can also be done in you main function as well. Below is a piece of code that will change the pre-scaler to zero.

// set the clock speed to "no pre-scaler" (8MHz with internal osc or
// full external speed)
// set the clock prescaler. First write CLKPCE to enable setting of clock the
// next four instructions.
CLKPR=(1< 

Hope this will help!

 

Add Voice /Audio to projects using WTV020SD

Adding sound to your projects is great, there can be several methods to do it. In this post i will show how we can use wtv020-sd module to get this task done. I wont go in detailed description of the module and will keep the post short and to the point. The module can be operated in a number of modes including pushbutton modes but the one we are going for is the 3 wire serial mode. its actually SDA,SCL and reset wires that we use. The module would play back the ad4 files stored on uSD Card. and spk+ and spk- pins can be connected directly to a speaker. More details about the module can be found in the datasheet and the webpage link.

The interface is simple. you only need to connect Supply , DI ,CLK and reset Pins to get it working although you may also connect some other pins also but this is what is really needed to get the module working.

connections …