Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - krish2487

1
Web platform / Getting started with microchips TCP IP stack
Hello all..

i know this is a much asked question, but i d still ask it anyway.
I am more of a power electronics guy in embedded systems.

more to do with pwoer conversion and power control.
I did acquire a web platform long ago in hopes of using it in one of my pet projects.

Recently i got an idea for its usage.

Let me make it clear first.
I have ZERO experience in ethernet, tcp ip etc etc etc.

i did read mircochips tcp ip stack help file back to back (not thoroughly though) several times in the last week in hopes of trying to understand it.

First of, it is pathetically documented. a first time user will most probably throw his hands up in disgust at the apparent (lack of) user friendliness.

secondly there is still a very large slip between the cup and the lip between microchips stack and the web platform.

Well, this is not a rant. I am working on a project where i am using a large solar panel (100 watts) to charge a 12V 40 ah battery. This battery will be powering my clients networking hardware (2 fibre optic media converters, 2 8-port linksys switches and 1 16-port switch). The charger itself is intelligent 12V 6A charger, has a PIC controller for sensing the solar panel output, battery level, load current and charge the battery using PWM. the client is happy with the solution and the entire setup, but they have no way of checking the battery level without physically going to the field. The entire setup is self sustainant. My client is a ISP provider. There are already about two hundred such units on the field.

As a personal project, i wanted to upgrade the hardware, implement SNMP protocol using microchips TCP IP stack and plug a ethernet cable from the charger to one of the port switches on the ethernet switch, so that they could monitor the data of the charger over ethernet while in their offices. It is not a clients requirement but i did get this idea that i would like to try out. I have one of their pilot installations on the top of my office. :-D
Not for commercial purposes though, its all on my time and effort.

I do not know if its crazy or not but i wanted to see if i could achieve it.

As i mentioned earlier, i acquired a web platform a while back. i just wanted to see if i could get started on the tcp ip stack on the web platform.

but a week of reading and net trawling = zero progress.

microchips forums are but for the more seasoned pros out there who know what they are doing. i doubt if anyone will want to invest time and effort helping out a greenhorn in networking.

i just wanted to ask here if anyone can get me started with the stack.

You know, something like this
1> include these files
2> modify these #defines
3> customize these variables.
4> Write your html web page using these functions.
5> Arrange your main function like this.
6> Build and flash the dsPic.
7> Connect and run.
Voila!!

(Yes, i am that dumb when it comes to ethernet and no i have no shame in asking for help :-D )

I did get the web platform walkthrough up and running though.
Must say far more newbie friendly than microchip.

Is anybody here willing to walk a newbie through the steps?

Thank you.
2
General discussion / Rotary Encoders - reading them with an arduino
Hello all.

I have a project in pipeline that requires the use of a rotary encoder. There are a milliion tutorials out there on the web which show how to read an incremental encoder none worked for me.

After much net-(s)trolling and several semi-sleepless nights later i arrived a version that works with little glitches.
It detects the direction, increments the value by the correct count etc etc.

I would much appreciate it if others were to judge the code and the algorithm.

Of course it does not apply to other encoders but you are welcome to try and adapt it to suit your needs. Any feedback with your respective model of encoders ant the codes behaviour wrt the encoder is much appreciated and highly anticipated.

Thank you guys..



here is a link to the page where i have written my method of arriving at the code/algorithm.

http://https://sites.google.com/site/krishmindmesh/rotary-encoder-with-arduino

and here is the code itself.

Code: [Select]
#define PHASE_A 2
#define PHASE_B 3
#define LED 13

static int counter=0,previous_counter=0,temp_counter=0;
static int CW_A=0,CCW_A=0,CW_B=0,CCW_B=0;

void setup()
{
 
  pinMode(PHASE_A,INPUT);
  pinMode(PHASE_B,INPUT);
  pinMode(LED,OUTPUT);
 
  digitalWrite(PHASE_A,HIGH);
  digitalWrite(PHASE_B,HIGH);
  attachInterrupt(0,rotary_read_A,RISING);
  attachInterrupt(1,rotary_read_B,FALLING);
 
  Serial.begin(9600);
}

void loop()
{
  //wait here forever
 
  if(counter!=previous_counter)
  {
  Serial.println(counter);
 
  previous_counter=counter;
 
  }
  digitalWrite(LED,HIGH);
  delayMicroseconds(counter);
  digitalWrite(LED,LOW);
  delayMicroseconds(500-counter);
 
 
}

void rotary_read_A()
{
  delay(50);
 ((digitalRead(PHASE_A)^digitalRead(PHASE_B))==1)?CW_A=1:CCW_A=1;

  (CW_A&CW_B==1)?temp_counter++:temp_counter--;
  (CCW_A&CCW_B==1)?temp_counter--:temp_counter++;
  counter=counter + (temp_counter/2);
  temp_counter=0;
  CW_A=0;
  CW_B=0;
  CCW_A=0;
  CCW_B=0;
  return;
}

void rotary_read_B()
{
  delay(50);
 ((digitalRead(PHASE_A)^digitalRead(PHASE_B))==0)?CW_B=1:CCW_B=1;
  return;
}
4
OpenOCD JTAG / Help with openOCD on windows
Hello

I am trying to get openOCD to work with buspirate on windows

I downloaded the executable from

http://www.freddiechopin.info/index.php/en

i downloaded both the 0.5.0-dev version as that had the buspirate.cfg file present in it

but try as i might i am not able to get openocd to connect with bus pirate

It gives me an error message that the specified interface was not found and then gave a list of supported interfaces among which bus pirate  was not present

i think that the openocd was not compiled with the buspirate configuration

is there any way i can make it work in its present state or do i have to build openocd from ground up to have support for bus pirate??

PS: the reason i downloaded the afore mentioned msi package fro freddie chopin is that i was not able to install openocd by building it.
I use Jolicloud on which the directory structure is different from the openocd linux installation tutorial
and on windows i tried the cygwin based method. Here the tutorial was for a FT2232 device and i have no idea how to apply it for a bus pirate
5
Bus Pirate Support / Bus Pirate, OpenOCD, LPC
@sjaak and tayken

Thank you..
:)

Okay here is my first learning opportunity
I am a total newbie when it comes to arm and bus pirate

However i have some amount of experience with PICs
16 series and the pic 24series
having done a couple of projects with them..

I wanted to get into arm programming

so i got this board- blueboard LPC1768

http://shop.ngxtechnologies.com/product ... ucts_id=65

as it seemed to offer to me the best value for money
( i am a little short of cash.. as always :-D )

i have gone through the forums and wiki to learn that the bus pirate supports JTAG programming
this board what i mentioned does come with a boot loader which can be used in conjunction with flash magic
(having said that we would not like to make things too easy for us hobbyists would we :-D)

i wanted to learn working with the bus pirate and also program the LPC
after going through the site i learnt that the tool i would be requiring is openOCD

after going through the openOCD site i ended up more confused than before

i have no idea what Git is nor how to use the openOCD or if openOCD supports the LPC JTAG programming at all....

can you guys give a explanation/steps what i would have to follow if openOCD supports the LPC

Thanks for the support guys
6
Bus Pirate Support / Hello world from a bus pirate newbie
Hello all
My name is chaitanya and I am the proud owner of a bus pirate(recently).

It is a fantastic tool and i keep appreciating this tool more and more day by day.
Not to sound nit-picky i would like to request the team of dangerous prototypes to provide a  pdf version of the bus pirate manual instead of the users trawling around the website for the same information.

I m sure for a newcomer like me the bus pirate is a very intimidating tool and the sheer volume of information and hot-tos present on the site will only be daunting.

I request the team to kindly post a concise/brief pdf illustrating the  bus pirate capabilities which would be a lot of help to noobs like me..

thank you
   

Edit: Moved to the support section

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01332332624session_write_close ( )...(null):0
20.01372464216ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01372464992Database_MySQL->query( ).../DatabaseHandler.php:119
40.05632603728Database_MySQL->error( ).../Db-mysql.class.php:273