Fayaz Kadir's Blog
A Peek into a Crazy mind
A Peek into a Crazy mind
Feb 26th
The code here is very very simple! This will help you get introduced into VHDL coding.
I have done the toggling of the switch in a slightly different manner.
When the button is not pressed, it is logically HIGH (1).
When it is pressed, it drops LOW (0).
If you make the LED toggle sychronously with the clock, and if you detect only the LOW state of the key, then your LED will toggle rapidly. This is because, everytime there is a clock event (50Mhz, or the clockspeed of the FPGA), it detects that there is a ’0′ on the push button, and will thus toggle.
The best and simple method to do it is to keep a memory of what happened in the previous clock cycle through the use of a variable. I used two variables, pbutt_old(to hold the state of the push button in the previous state) and state_old(to hold the state of the LED).
The priciple of the code is, everytime you press the button, the button logic goes from 1 to 0. and when you release it, it goes from 0 to 1.
So if you see that your previous state was 1 and your new state is 0, then obviously you pressed the button.(toggling should occur only here)
If your old state is 0, and new state is 0, it means that the push button is HELD in a pressed position. (no toggling should occur at this point)
If your old state is 1, and new state is 1; it means you never pushed the button. (no toggling should occur).
CLICK TO READ THE REST
Feb 24th
This code demonstrates Binary to HEX.
The code might look long, but its simple; it should work by just coping and paste (assuming that you assign the pins before programming it onto the board)
Feb 24th
I have just added a small Microntroller Programming tutorial using PIC16F877A.
This tutorial should work for most other PIC microcontrollers.
The tutorial can be found here
LINK
Have Fun with your Projects, remember to email me. I probably can help you out if you are stuck. When you email me with a problem, PLEASE provide a screenshot of where you are stuck. It’s hard for me to comprehend someone’s description, as multiple people have multiple description of the exact same thing.
| PAGE | CONTENT |
| 1 | Software Setup |
| 2 | Hardware Setup |
| 3 | Programmer setup with Basic programming |
Feb 24th
I looked all over the net for a code that will allow me to convert Binary to BCD.
Most circuits were either in Verilog or if VHDL it was a combinational circuit.
yes, yes… combinational is faster..
but my professor asked me to code a Binary to BCD sequential vhdl code.
I know its stupid, tell me about it..
Jul 3rd
The code contains a simple Serial Protocol that can form a basic-robust backbone of a Computer-uController Communication. It works with the principle of TCP/IP. Where the computer sends info to the uController, if the information string was properly received, the uController responds back with either $Y(for success) or $N(for failure)
Btw, the code can be easily edited to allow more Start of Line characters. Read the comment section (especially a post by AngusU). You will know what I mean
Jun 18th
Fell at 50km/h on Friday 18th,2010.
BRIGHT SIDE: I AM ALIVE
To prevent something like this, PLEASE WEAR a helmet. I wasn’t wearing one.
Jun 15th
To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
To read the story on HOW I broke the spoke, press more
May 20th
I recently got a shipment of three SP350-48 Meanwell supplies. From the endless sphere forum, I thought they were just CV(Constant Voltage) power supplies, and thus I was designing a CC(constant Current) circuit similar to what you can buy from the Tppacks website.
In the End I have seen that these are actually newer model, with 3-shunts, and most IMPORTANTLY, they are CC-CV (Constant Current-Constant Voltage).
The Max current delivery at 59V was seen to be at 9.8A for 5minutes, and then drops to 7.6A( which is 0.3A more than rated current).
What I wanted was somewhere around 3A for the charging rate. Thus, what I did, was simply cut off 2 of the 3 shunt wires, thus reducing the current by one-third( to 3.5A). Not bad for $40. If I ever want more current again, I will simply resolder the shunts
To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
May 18th
This is a MUST HAVE for any ebikers who want to carry another passenger to share their box of electric fun
To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Btw, the Xtracycle kit does change the feel of the cycle. Here are a list of the changes
1. The Cycle is atleast 1.5foot longer(they say 15 Inches, but it feels longer)
2. Previously, My weight distribution was like this 28Lbs Front- 42Lbs Rear (yes, my cycle does weigh 70lbs)
Now it is 47Lbs rear, and 43 Lbs front. Thats almost 50-50. Which is good, and kind of bad too. You don’t want to be loosing traction on the rear wheel while making a turn (since the cycle is longer, I won’t be making 90° turns at 50kmph. Maybe 45kmph
The good thing is, now, I can easily slip my Crystalyte 5303 on dusty road, or with wet tires(after rain) on the hallways of my building.
During hard acceleration, while I am done with 80% of the turn, the wheel drifts 8-) , causing the cycle to vibrate a bit due to the knobby mtb tires, which is kind of cool
Another good thing about the bike being long is, now the wheelbase is longer, making the bike more stable even if the rear/front wheel has no traction.
Bad: During 4-10kmph the motor vibration causes the frame to resonate and emit a loud growling noise. So if you want a complete silent ride, look elsewhere.
Good: The cycle now feels like a motorcycle, growling to show off that you have 4kW(5Hp
) of power. Btw there is absolutely no noise after 10kmph. And how long do we cycle at <10kmph anyways
! I am usually doing 35kmph+ most of the time.
Bad: due to the cycle being longer, causing the point of rear wheel being further away from the suspension pivot, and due to the laws of physics, The rear suspension spring now faces greater force.
Good: Suspension Feels Softer, ride is atleast 3x better. Small movement of rear shock is enough to smoothen out the harsh bumps.
Good: You can carry a person.
Bad: Its a little to wobbly for my taste when a person moves .
Overall Rating So far : 4.5 Out of 5.
May 15th
Some photo of the upcoming Electric Boat Conversion project.
It will house a Agni Motor 95 reinforced, OSMC (Open Source Motor Controller), and bunch of lipo batteries. Very simple Conversion, yet elegant. Below are the photos of the old boat getting its finish touch paints, new touch up stickers, and a new name “Whisper”
To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.